summaryrefslogtreecommitdiff
path: root/web-ui/app/js/helpers/iterator.js
diff options
context:
space:
mode:
Diffstat (limited to 'web-ui/app/js/helpers/iterator.js')
-rw-r--r--web-ui/app/js/helpers/iterator.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/web-ui/app/js/helpers/iterator.js b/web-ui/app/js/helpers/iterator.js
index 093d8df1..b5b44379 100644
--- a/web-ui/app/js/helpers/iterator.js
+++ b/web-ui/app/js/helpers/iterator.js
@@ -14,6 +14,7 @@
* You should have received a copy of the GNU Affero General Public License
* along with Pixelated. If not, see <http://www.gnu.org/licenses/>.
*/
+'use strict';
define(function () {
return Iterator;
@@ -24,7 +25,7 @@ define(function () {
this.elems = elems;
this.hasPrevious = function () {
- return this.index != 0;
+ return this.index !== 0;
};
this.hasNext = function () {
@@ -51,7 +52,7 @@ define(function () {
var removed = this.current(),
toRemove = this.index;
- !this.hasNext() && this.index--;
+ if(!this.hasNext()) { this.index--; }
this.elems.remove(toRemove);
return removed;
};