File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -299,14 +299,17 @@ export default class PortalsCanvasExtension extends CanvasExtension {
299
299
data . edges . push ( ...newData . edges )
300
300
}
301
301
302
- // Add interdimensional // TODO: Only loop through open portals (can be done because of tryOpenPortal)
302
+ // Add interdimensional edges // TODO: Only loop through open portals (can be done because of tryOpenPortal)
303
303
for ( const nodeData of data . nodes ) {
304
304
if ( nodeData . type !== 'file' || ! ( nodeData as CanvasFileNodeData ) . isPortalLoaded ) continue // Only loaded portals
305
305
306
306
const interdimensionalEdges = ( nodeData as CanvasFileNodeData ) . interdimensionalEdges
307
307
if ( ! interdimensionalEdges ) continue // No interdimensional edges
308
308
309
309
for ( const edge of interdimensionalEdges ) data . edges . push ( edge )
310
+
311
+ // Remove interdimensional edges from portal node (to avoid duplication on re-save)
312
+ delete ( nodeData as CanvasFileNodeData ) . interdimensionalEdges
310
313
}
311
314
312
315
return data
You can’t perform that action at this time.
0 commit comments