From d50da5edc648bd332846ee12249e8dbdba211df6 Mon Sep 17 00:00:00 2001 From: Morozov Andrew Date: Tue, 26 Nov 2013 13:18:27 +0200 Subject: [PATCH] type error: fix --- src/echo.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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); } } }