berkmancenter / dotplot

Telling a story through dots
GNU General Public License v3.0
51 stars 27 forks source link

Cannot add second frame after refactor #101

Closed jdcc closed 7 years ago

jdcc commented 7 years ago

I can't add a second frame. Nothing happens in the UI, and I get the following in the console:

TypeError: Cannot read property 'id' of undefined
    at singleChoiceNode (create.js:189)
    at create.js:212
    at Class.forEach (ember.debug.js:35413)
    at singleChoiceNodes (create.js:211)
    at tryCatch (

The lines it refers to looks like this:

var nodeObject = controller.get('nodes').findBy('id', node.get('id'));
                    newNode = {
                        id: nodeObject.id,
                        x: nodeObject.x,
                        y: nodeObject.y,
                        fill: nodeObject.fill
                    };

nodeOjbect is coming back empty.

chaitanyya commented 7 years ago

I removed some conditional form the new code. It worked with the data I had, but I just tested it using new export and got the same error. Thanks for pointing out.