symbench / electric-circuits

Electric Circuits Domain for webGME
https://webgme.symbench.org
Apache License 2.0
12 stars 3 forks source link

Uncaught TypeError in ElectricCircuitEditor #106

Closed umesh-timalsina closed 3 years ago

umesh-timalsina commented 3 years ago

The following circuit when visualized in ElectricCircuitEditor image throws the following error:

q.js:428 Uncaught TypeError: Cannot read property 'getId' of undefined
    at ElectricCircuitsEditorControl.Ground (ElectricCircuitEditorControl.Joint.js:86)
    at ElectricCircuitsEditorControl.toJointJSON (ElectricCircuitEditorControl.Joint.js:54)
    at ElectricCircuitsEditorControl._getObjectDescriptor (ElectricCircuitsEditorControl.js:84)
    at ElectricCircuitsEditorControl._onLoad (ElectricCircuitsEditorControl.js:114)
    at ElectricCircuitsEditorControl._eventCallback (ElectricCircuitsEditorControl.js:95)
    at Object.FN (ElectricCircuitsEditorControl.js:63)
    at userEvents (client.js:308)
    at _updateTerritoryAllDone (client.js:432)
    at patternLoaded (client.js:1875)
    at childrenPatternLoaded (client.js:322)
    at childrenPatternLoaded (client.js:322)
    at loadChildrenPattern (client.js:358)
    at childLoaded (client.js:333)
    at q.js:2322
    at n (q.js:404)
    at e (q.js:392)
    at q.js:252
    at c.run (q.js:154)
    at l (q.js:124)
umesh-timalsina commented 3 years ago

This happens because the territory can contain children at depth two, which means the visualizer should specifically not parse the subcircuit components.