Closed niki4810 closed 11 years ago
I also aboserved similar behavior when the control reaches the setStyle function in the flotr2 library, where the second parameter o is being passed as undefined.
setStyles: function(element, o) {
_.each(o, function (value, key) {
element.style[key] = value;
});
}
Ok, I think i've figured out this issue, I was using an older version of underscore which did not support looping though null objects, updating the underscore to a newer version, which did an explicit null check if (obj == null) return;
resolved this issue. Sorry for the false alarm :)
Hi,
I am using flotr2.amd.js for one of my project and I am running into this issue where I am getting a NPE in the initPlugins function right where it is looping through plugin.callbacks object
When I debugged through this I found that when the plugin name is
download
, the plugin object does not have callbacks key defined and when its reaches this _.each loop its throwing an exception.As a quick work around I added this code to fix it locally,
i.e to check if the plugin has a callbacks property defined and if so run through the loop. Not sure if its a correct way to solve this.
Could you please provide your comments/feedback on this ?
Thanks