Closed binarykitchen closed 7 years ago
Firefox 50 already has join
on arrays, so the es5-shim should be a noop.
If you remove the es5-shim import, does it still happen?
Which version of angular are you using? I believe some versions of angular 1 have bugs around this sort of thing.
haven't tried removing the shim yet as i dont want to break my site. using angular v1.6.3 here.
these are the contents of my main.js
file
require('es5-shim')
require('angular')
require('angular-resource')
require('angular-local-storage')
require('angular-google-analytics')
require('angular-route')
require('angular-sanitize')
require('ng-email-list')
// some app code
...
In Firefox 50 specifically, the es5-shim shouldn't be having much effect, so I think you should be able to remove it locally and test?
well i can't reproduce this locally. only happens by random on my production site.
Either way I think it's definitely an angular 1 bug, considering that arrays always have a join
method (that's pre-ES3, es5-shim fixes it but doesn't provide it), and considering that's where the error is thrown from.
hmm, i ll try to debug in the angularjs core code then ugh ...
I'd also recommend searching their open and closed issues; it may have been previously reported.
Happy to reopen if it turns out to be a bug in es5-shim!
I have
require('es5-shim')
at top of my JS entry file which is supposed to shim Array's join function.But few lines further down, where I have
require('angular')
and AngularJS code gets executed,TypeError: value.join is not a function
is thrown for this user agentuseragent Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:50.0) Gecko/20100101 Firefox/50.0
Using the latest version here. But do not see why this is happening.