You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 27, 2018. It is now read-only.
I'm trying to use ng-admin with an older browser (PhantomJS 1.9, backed by Safari 5).
It doesn't have Array.find, so I'm using this polyfill.
However, this breaks ng-admin in another way, because this code attempts to iterate over array entries using "for .. in":
getMappedValue(value, entry) {
for (let i in this._maps) {
value = this._maps[i](value, entry);
}
return value;
}
It's not safe to iterate over arrays in this way, see e.g. this stackoverflow answer, as any functions which have been added to Array.prototype will get returned along with all the array entries.
I believe that this and all other array loops in ng-admin and admin-config need converting to use a "for (var i = 0; i < array.length; i++) { style loop instead.
A quick grep suggests that there are a great many such loops in ng-admin and admin-config :-(
The text was updated successfully, but these errors were encountered:
Hi,
I'm trying to use
ng-admin
with an older browser (PhantomJS 1.9, backed by Safari 5).It doesn't have Array.find, so I'm using this polyfill.
However, this breaks
ng-admin
in another way, because this code attempts to iterate over array entries using "for .. in":It's not safe to iterate over arrays in this way, see e.g. this stackoverflow answer, as any functions which have been added to
Array.prototype
will get returned along with all the array entries.I believe that this and all other array loops in
ng-admin
andadmin-config
need converting to use a "for (var i = 0; i < array.length; i++) {
style loop instead.A quick grep suggests that there are a great many such loops in
ng-admin
andadmin-config
:-(The text was updated successfully, but these errors were encountered: