diff --git a/src/echo.js b/src/echo.js index 4e89920..20b2510 100644 --- a/src/echo.js +++ b/src/echo.js @@ -12,11 +12,11 @@ window.Echo = (function (window, document, undefined) { var _pollImages = function () { for (var i = 0; i < store.length; i++) { - var self = store[i]; + var self = store[i], array = Array.prototype; if (_inView(self)) { self.src = self.getAttribute('data-echo'); - if (store.indexOf(self) !== -1) { - store.splice(i, 1); + if (array.indexOf.call(store, self) !== -1) { + array.splice.call(store, i, 1); } } }