Closed maxious closed 12 years ago
The minimal demo does not work out of the box because node.breakdowns is undefined (but not explicitly null) at line 212: $.each(node.breakdowns, function (c,bd) { https://github.com/okfn/bubbletree/commit/a89575047a64b2f5717b802afc7dd2b894bf4b6a#L1R212
$.each(node.breakdowns, function (c,bd) {
This results in an error "Uncaught TypeError: Cannot read property 'length' of undefined" in jQuery and the bubbletree does not display.
I worked around this by making the conditional on line 210: if (node.breakdowns !== null && typeof node.breakdowns != "undefined") {
if (node.breakdowns !== null && typeof node.breakdowns != "undefined") {
but I don't know if that's the right way to do it. It does make the minimal demo work again though.
thx for reporting. changed the line to `ìf (node.breakdowns)`` which should fix the problem.
The minimal demo does not work out of the box because node.breakdowns is undefined (but not explicitly null) at line 212:
$.each(node.breakdowns, function (c,bd) {
https://github.com/okfn/bubbletree/commit/a89575047a64b2f5717b802afc7dd2b894bf4b6a#L1R212This results in an error "Uncaught TypeError: Cannot read property 'length' of undefined" in jQuery and the bubbletree does not display.
I worked around this by making the conditional on line 210:
if (node.breakdowns !== null && typeof node.breakdowns != "undefined") {
but I don't know if that's the right way to do it. It does make the minimal demo work again though.