From 6f96b4f9b19e54fba9e392347959e0e1ee68d876 Mon Sep 17 00:00:00 2001 From: Alex Xu Date: Thu, 22 Aug 2013 11:31:54 -0400 Subject: jshint --- www/js/imachine.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'www/js/imachine.js') diff --git a/www/js/imachine.js b/www/js/imachine.js index 5e21ac6..5e8423c 100644 --- a/www/js/imachine.js +++ b/www/js/imachine.js @@ -53,13 +53,14 @@ html5ks.imachine = (function () { break; case "if": var cpy = inst.slice(0), - type = ''; + type = '', + next = null; el: while (type = cpy.shift()) { switch (type) { case "if": case "elif": - var cond = cpy.shift(), - next = cpy.shift(); + var cond = cpy.shift(); + next = cpy.shift(); switch (cond[0]) { case "_return": if (this._return == cond[1]) { @@ -77,6 +78,7 @@ html5ks.imachine = (function () { if (html5ks.store.attraction[cond[0]] > cond[1]) { break el; } + break; default: throw new Error("unhandled if statement"); } @@ -87,7 +89,6 @@ html5ks.imachine = (function () { } } return html5ks.imachine.run(next).then(runInst); - break; case "path_end": // TODO: disp vid + add to persistent deferred.resolve(); -- cgit v1.2.3-54-g00ecf