on master help sign in
addDelay must take a number now, it fails otherwise
2a3eb06Michael James
runtime/Init.js+4−2
@@ -45,8 +45,10 @@ function init(display, container, module, ports, moduleToReplace) {
45 };
45 };
46
46
47 var addDelay = function(d) {
47 var addDelay = function(d) {
48− var delay = (d|0);
48+ if (typeof d !== "number") {
49+ throw "addDelay must take a number (preferably an int), not: " + d
50+ }
49− inducedDelay += delay;
51+ inducedDelay += d;
50 return inducedDelay;
52 return inducedDelay;
51 }
53 }
52
54