on master help sign in
addDelay must take a number now, it fails otherwise
commit2a3eb06dcc2395c1245a67ac7feb82f49703822a authorMichael James <michael@michaelbjames.com> dateMon 21 Jul 2014, 16:38 (12 years ago) parentf8048be
1 file changed+4−2
runtime/Init.js+4−2
runtime/Init.js+4−2
@@ -45,8 +45,10 @@ function init(display, container, module, ports, moduleToReplace) {
4545 };
4646
4747 var addDelay = function(d) {
48− var delay = (d|0);
49− inducedDelay += delay;
48+ if (typeof d !== "number") {
49+ throw "addDelay must take a number (preferably an int), not: " + d
50+ }
51+ inducedDelay += d;
5052 return inducedDelay;
5153 }
5254