-
Notifications
You must be signed in to change notification settings - Fork 1.1k
error within chunking iterator: TypeError: a.remove is not a function #1652
Comments
Need an example where this is happening; but you would probably get better error information if you are not using minified code. (This is assumed, so if I am wrong apologies up front.) |
not sure why it said : angular-google-maps.min.js cause im not using minified and I checked again now and the error is the same, just without .min. as I wrote above, unfortunately i tried to reproduce the error in plnkr, but i couldn't :/ IT is the same code and libraries i have locally, except a whole other bunch of libraries I have for my project that are not related but not sure whether they would cause incompatibility problems :/ From the error do you have any idea of what would be going wrong with the 2.2.1 that didn't with the 2.1.5 when I drop markers on the map (again, the error happens as I drop the 2nd marker on the map :( ) |
I don't know if it is an error per-say in the library. It means that some object a (which I do not see anywhere) is calling a function |
But bottom line is I can't really help without an example that actually produces the problem. |
I understand. I will try to see how i can reproduce this, else I will keep 2.1.5 unitll i can figure out how to reproduce it. |
You don't have anything that is expected to be bound to remove do u? IE an attribute that is |
Also disable chunking with |
no remove. I am dropping marker from outside to the map, by adding the selected img to the array that is binded to the markers in the map and then do $scope.$apply(); else the markers are not shown on map. If I remove $scope.$apply() and drag and drop them, i get no error (right away), but no marker visible, but if then I move the map, so that its "refreshed" then i get the same error. Also chunck =false didnt really help :/ |
Much better then it is a bug or something with an event listener being removed. |
you are right, i think. I have the following:
and I i remove the code above, not having a window, it works fine without throwing that error :/ |
Probably this https://github.com/angular-ui/angular-google-maps/blob/2.2.1/dist/angular-google-maps.js#L939 Are you extending |
Anyway using |
I do extend it but i can remove that. however i have a library bluebird.js from the template i am using, which i saw extends Array.prototype. About the _.each, angular.each, [].each, how did you suggest me to use them (meaning, where)? Also the last screenshot i posted where you said "much better" was from safari. Chrome (in the same page) doesn't throw that same error. and another page again, gives a similar error right off the bat: TypeError: a.remove is not a function |
It is just me making notes on what I need to change in the code base. Nothing you can do. Its a bug and all of those are fixes. But you can test and confirm my assumptions by trying those changes directly in your angular-google-maps.js verison modified with one of those ideas. |
hey there. so removing my custom method of "array.prototype" fixed all issues so far for what i have seen. :) |
Cool, yeah so whatever that prototype was was being passed to google as an object to remove which.. does not have the function |
So its kinda bug on two fronts.. one I need a better iterator or saftey check .. 2 (your side) you should be more careful with your prototypes :) . |
You right :) will keep that in mind :) I guess I can close the issue now! :) Thanks again for the help! was useful to pinpoint the issue! :) |
Going to keep it open as I won't remember to make that fix without this existing. |
ok ill reopen it! |
…t those that override Array.prototype issue #1652
resolved |
Can you package this as part of a release so it is available on NPM? |
Yes I'll get this started. I think it will be 2.3.0 as there were possible breaking changes in |
@nmccready great - thanks so much! |
Hello everyone,
I am having a strange issue and i don't know what to make of it (see title).
That happen when I drop the a 2nd marker on the map, and if I drop say 5 and I try to click on each marker to open the InfoWindow, it only opens it for the first 2 markers and not the other ones.
I tried to reproduce it on plunkr, but wasn't able, as there it works just fine. I copied the whole code (relevant parts) and on my machine the same doesn't work properly.
http://plnkr.co/edit/qboJnHGORg4EQWZ6WG9B?p=preview
I am using 2.2.1 and if load 2.1.5 instead, i don't get that error!
DOes anyone have an idea what's going on?
The text was updated successfully, but these errors were encountered: