From fbb17083d5810171c5e629d33a112b44ae453c84 Mon Sep 17 00:00:00 2001 From: Jon Schlinkert Date: Sun, 4 Mar 2018 13:58:41 +0200 Subject: [PATCH] Fix condition in if statement for data-rotate-order References #673 --- build.js | 3 +++ js/impress.js | 4 +++- src/impress.js | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/build.js b/build.js index 8b43a96..2aacc4b 100644 --- a/build.js +++ b/build.js @@ -3,6 +3,9 @@ var buildify = require('buildify'); buildify() .load('src/impress.js') + .perform(function(content){ + return "// This file was automatically generated from files in src/ directory.\n\n" + content; + }) // Libraries from src/lib .concat(['src/lib/gc.js']) .concat(['src/lib/util.js']) diff --git a/js/impress.js b/js/impress.js index 8af6ce5..0fa2a93 100644 --- a/js/impress.js +++ b/js/impress.js @@ -1,3 +1,5 @@ +// This file was automatically generated from files in src/ directory. + /** * impress.js * @@ -59,7 +61,7 @@ var returnStr = ""; if ( typeof order === "string" ) { for ( var i in order.split( "" ) ) { - if ( validChars.indexOf( order[ i ] >= 0 ) ) { + if ( validChars.indexOf( order[ i ] ) >= 0 ) { returnStr += order[ i ]; // Each of x,y,z can be used only once. diff --git a/src/impress.js b/src/impress.js index 4120915..daad905 100644 --- a/src/impress.js +++ b/src/impress.js @@ -59,7 +59,7 @@ var returnStr = ""; if ( typeof order === "string" ) { for ( var i in order.split( "" ) ) { - if ( validChars.indexOf( order[ i ] >= 0 ) ) { + if ( validChars.indexOf( order[ i ] ) >= 0 ) { returnStr += order[ i ]; // Each of x,y,z can be used only once.