{"action":"created","issue":{"url":"https://api.github.com/repos/dagrejs/dagre/issues/234","repository_url":"https://api.github.com/repos/dagrejs/dagre","labels_url":"https://api.github.com/repos/dagrejs/dagre/issues/234/labels{/name}","comments_url":"https://api.github.com/repos/dagrejs/dagre/issues/234/comments","events_url":"https://api.github.com/repos/dagrejs/dagre/issues/234/events","html_url":"https://github.com/dagrejs/dagre/issues/234","id":303272641,"node_id":"MDU6SXNzdWUzMDMyNzI2NDE=","number":234,"title":"Cannot set property 'order' of undefined","user":{"login":"mmacfadden","id":1812291,"node_id":"MDQ6VXNlcjE4MTIyOTE=","avatar_url":"https://avatars0.githubusercontent.com/u/1812291?v=4","gravatar_id":"","url":"https://api.github.com/users/mmacfadden","html_url":"https://github.com/mmacfadden","followers_url":"https://api.github.com/users/mmacfadden/followers","following_url":"https://api.github.com/users/mmacfadden/following{/other_user}","gists_url":"https://api.github.com/users/mmacfadden/gists{/gist_id}","starred_url":"https://api.github.com/users/mmacfadden/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mmacfadden/subscriptions","organizations_url":"https://api.github.com/users/mmacfadden/orgs","repos_url":"https://api.github.com/users/mmacfadden/repos","events_url":"https://api.github.com/users/mmacfadden/events{/privacy}","received_events_url":"https://api.github.com/users/mmacfadden/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":21,"created_at":"2018-03-07T21:49:58Z","updated_at":"2018-06-24T16:01:53Z","closed_at":null,"author_association":"NONE","body":"Greetings. I am seeing the following error:\r\n\r\n```\r\nTypeError: Cannot set property 'order' of undefined\r\n    at dagre.core.js:1395\r\n    at arrayEach (lodash.js:1289)\r\n    at Function.<anonymous> (lodash.js:3345)\r\n    at dagre.core.js:1394\r\n    at arrayEach (lodash.js:1289)\r\n    at Function.<anonymous> (lodash.js:3345)\r\n    at assignOrder (dagre.core.js:1393)\r\n    at order (dagre.core.js:1371)\r\n    at dagre.core.js:495\r\n    at notime (dagre.core.js:2897)\r\n```\r\n\r\nAfter doing some debugging I see the following:\r\n\r\n```\r\nfunction assignOrder(g, layering) {\r\n  _.each(layering, function(layer) {\r\n    _.each(layer, function(v, i) {\r\n        g.node(v).order = i;\r\n    });\r\n  });\r\n}\r\n```\r\n\r\nIn this function `layer` is an array, seemingly containing strings (maybe id's). When this error crops up, it seems that several items in the `layer` array are `undefined`. Therefore `g.node(undefined)` also returns undefined and produces the error.\r\n\r\nI am currently going through our code to see what might be causing the issue, but was hoping that maybe the authors had some insight into what I might look for."},"comment":{"url":"https://api.github.com/repos/dagrejs/dagre/issues/comments/399767107","html_url":"https://github.com/dagrejs/dagre/issues/234#issuecomment-399767107","issue_url":"https://api.github.com/repos/dagrejs/dagre/issues/234","id":399767107,"node_id":"MDEyOklzc3VlQ29tbWVudDM5OTc2NzEwNw==","user":{"login":"j6k4m8","id":693511,"node_id":"MDQ6VXNlcjY5MzUxMQ==","avatar_url":"https://avatars2.githubusercontent.com/u/693511?v=4","gravatar_id":"","url":"https://api.github.com/users/j6k4m8","html_url":"https://github.com/j6k4m8","followers_url":"https://api.github.com/users/j6k4m8/followers","following_url":"https://api.github.com/users/j6k4m8/following{/other_user}","gists_url":"https://api.github.com/users/j6k4m8/gists{/gist_id}","starred_url":"https://api.github.com/users/j6k4m8/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/j6k4m8/subscriptions","organizations_url":"https://api.github.com/users/j6k4m8/orgs","repos_url":"https://api.github.com/users/j6k4m8/repos","events_url":"https://api.github.com/users/j6k4m8/events{/privacy}","received_events_url":"https://api.github.com/users/j6k4m8/received_events","type":"User","site_admin":false},"created_at":"2018-06-24T16:01:53Z","updated_at":"2018-06-24T16:01:53Z","author_association":"NONE","body":"Hm. I'm not sure what the benefit of having `undefined`s in the array is, but I imagine that it'd be better to pass to ranks and remove `undefined`s rather than ignoring them; @mmacfadden?"}}
{"actor":{"display_login":"j6k4m8"}}