HumbleSoftware/Flotr2

flotr2.js from the repo isn't usable in an app with RequireJS loaded

Opened this issue · 2 comments

I get https://github.com/HumbleSoftware/Flotr2/blob/master/flotr2.js and import it in my app as AMD module. Loading of flotr2 fails with the following error:

Uncaught ReferenceError: bean is not defined flotr2.js:1359
(anonymous function) flotr2.js:1359
(anonymous function) flotr2.js:1596

It seems that bundled 'bean' lib support AMD and checks for presence of define function. And if it exists then bean do not export itself globaly. But flotr2 totally ignores this logic and expect to find bean in global context.

#249 should be able to fix that.

I created a branch and a pull request in #273 if you want to have a look.