{"action":"created","issue":{"url":"https://api.github.com/repos/tombatossals/angular-leaflet-directive/issues/899","labels_url":"https://api.github.com/repos/tombatossals/angular-leaflet-directive/issues/899/labels{/name}","comments_url":"https://api.github.com/repos/tombatossals/angular-leaflet-directive/issues/899/comments","events_url":"https://api.github.com/repos/tombatossals/angular-leaflet-directive/issues/899/events","html_url":"https://github.com/tombatossals/angular-leaflet-directive/issues/899","id":103040288,"number":899,"title":"Error: _iterate function includes custom methods of Array's prototype chain","user":{"login":"LostCrew","id":1306576,"avatar_url":"https://avatars.githubusercontent.com/u/1306576?v=3","gravatar_id":"","url":"https://api.github.com/users/LostCrew","html_url":"https://github.com/LostCrew","followers_url":"https://api.github.com/users/LostCrew/followers","following_url":"https://api.github.com/users/LostCrew/following{/other_user}","gists_url":"https://api.github.com/users/LostCrew/gists{/gist_id}","starred_url":"https://api.github.com/users/LostCrew/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LostCrew/subscriptions","organizations_url":"https://api.github.com/users/LostCrew/orgs","repos_url":"https://api.github.com/users/LostCrew/repos","events_url":"https://api.github.com/users/LostCrew/events{/privacy}","received_events_url":"https://api.github.com/users/LostCrew/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/tombatossals/angular-leaflet-directive/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/tombatossals/angular-leaflet-directive/labels/duplicate","name":"duplicate","color":"cccccc"},{"url":"https://api.github.com/repos/tombatossals/angular-leaflet-directive/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-08-25T14:54:38Z","updated_at":"2015-08-26T13:39:43Z","closed_at":"2015-08-25T22:11:49Z","body":"Since I have my `Array.prototype.find` polyfill for non-modern browser, an error occurs while adding mapEvents with addEvents call. The function is passed to Leaflet's `addEventListener` mixin, which accepts only strings.\r\n\r\nLoop in `_iterate`:\r\n\r\n![screen shot 2015-08-25 at 16 45 08](https://cloud.githubusercontent.com/assets/1306576/9469884/a4417538-4b49-11e5-96fe-daaaa5152865.png)\r\n\r\n`eventName` is function, not string:\r\n\r\n![screen shot 2015-08-25 at 16 40 14](https://cloud.githubusercontent.com/assets/1306576/9469856/81f4776e-4b49-11e5-85ea-1263097e42de.png)\r\n\r\nFinal error:\r\n\r\n![screen shot 2015-08-25 at 16 44 24](https://cloud.githubusercontent.com/assets/1306576/9469941/dec1b77c-4b49-11e5-86ef-2445a4462f80.png)\r\n\r\nSolution: https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Statements/for...in#Iterating_over_own_properties_only\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/tombatossals/angular-leaflet-directive/issues/comments/135024613","html_url":"https://github.com/tombatossals/angular-leaflet-directive/issues/899#issuecomment-135024613","issue_url":"https://api.github.com/repos/tombatossals/angular-leaflet-directive/issues/899","id":135024613,"user":{"login":"nmccready","id":583593,"avatar_url":"https://avatars.githubusercontent.com/u/583593?v=3","gravatar_id":"","url":"https://api.github.com/users/nmccready","html_url":"https://github.com/nmccready","followers_url":"https://api.github.com/users/nmccready/followers","following_url":"https://api.github.com/users/nmccready/following{/other_user}","gists_url":"https://api.github.com/users/nmccready/gists{/gist_id}","starred_url":"https://api.github.com/users/nmccready/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nmccready/subscriptions","organizations_url":"https://api.github.com/users/nmccready/orgs","repos_url":"https://api.github.com/users/nmccready/repos","events_url":"https://api.github.com/users/nmccready/events{/privacy}","received_events_url":"https://api.github.com/users/nmccready/received_events","type":"User","site_admin":false},"created_at":"2015-08-26T13:39:43Z","updated_at":"2015-08-26T13:39:43Z","body":"@LostCrew pending on #874 as I need to know what version number to release."}}