FacultyCreative / ngActiveResource

Connects business objects and REST web services for Angular.js
255 stars 34 forks source link

Firefox Error: mixinProp is not defined #43

Open jamesjtong opened 10 years ago

jamesjtong commented 10 years ago

The way the function mixinProp is currently being defined in the provider ARMixin doesn't work with firefox.

Firefox isn't hoisting mixinProp() as its being defined within a for loop and it is causing the following error:

Error: mixinProp is not defined

Please see gist and plunkr(open in firefox vs. open in chrome) to see the differences in hoisting

https://gist.github.com/jamesjtong/10272048 http://plnkr.co/edit/qrEuUUzDcwWjQFYILsaC?p=preview

AlJohri commented 10 years ago

+1 I had this issue as well and fixed it in my own fork.

https://github.com/AlJohri/ngActiveResource/commit/4369ad005c90ad50cad9bc646376b80512690326

To be clear, the change is only in lib/angular-resource/base/base.js. dist/ng-active-resource.js is just a concatenated script with the same change.

jamesjtong commented 10 years ago

thank you so much for being clear! I am new to this format; I revised and made appropriate changes in my pull request