diff --git a/bower.json b/bower.json index e1f6533..13ddd73 100644 --- a/bower.json +++ b/bower.json @@ -1,7 +1,7 @@ { "name": "postpone", "main": "index.js", - "version": "0.6.2", + "version": "0.6.3", "homepage": "https://github.com/lsvx/postpone", "authors": [ "Lucas Serven " diff --git a/component.json b/component.json index d811764..fd860e6 100644 --- a/component.json +++ b/component.json @@ -2,7 +2,7 @@ "name": "postpone", "repo": "lsvx/postpone", "description": "A polyfill for postponing the loading of media.", - "version": "0.6.2", + "version": "0.6.3", "keywords": ["postpone", "media", "resource", "priority", "download"], "dependencies": {}, "development": {}, diff --git a/index.js b/index.js index 369f301..77276f6 100644 --- a/index.js +++ b/index.js @@ -139,7 +139,7 @@ if ( this.isVisible( matches[ i ] ) ) { visible.push( matches[ i ] ); /** Check if this element is not already postponed. */ - if ( !~this.elements.visible.indexOf( matches[ i ] ) ) { + if ( matches[ i ] !== this.elements.visible[ visible.length - 1 ] ) { change = true; } } diff --git a/package.json b/package.json index a4af471..76a554c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "postpone", - "version": "0.6.2", + "version": "0.6.3", "description": "A polyfill for postponing the loading of media.", "main": "index.js", "directories": { diff --git a/test/build.js b/test/build.js index 0918455..19da7d2 100644 --- a/test/build.js +++ b/test/build.js @@ -341,7 +341,7 @@ require.register("postpone/index.js", Function("exports, require, module", if ( this.isVisible( matches[ i ] ) ) {\n\ visible.push( matches[ i ] );\n\ /** Check if this element is not already postponed. */\n\ - if ( !~this.elements.visible.indexOf( matches[ i ] ) ) {\n\ + if ( matches[ i ] !== this.elements.visible[ visible.length - 1 ] ) {\n\ change = true;\n\ }\n\ }\n\