on master help sign in
Fix bug in which "every" stopped triggering
64357d8Evan Czaplicki
libraries/Native/Signal/Time.js+5−5
@@ -36,11 +36,11 @@ Elm.Native.Time.make = function(elm) {
36
36
37 function every(t) {
37 function every(t) {
38 var clock = NS.input(Date.now());
38 var clock = NS.input(Date.now());
39− var id = elm.runDelayed(function tellTime() {
39+ function tellTime() {
40− if (elm.notify(clock.id, Date.now())) {
40+ elm.notify(clock.id, Date.now());
41− elm.runDelayed(tellTime, t);
41+ elm.runDelayed(tellTime, t);
42− }
42+ }
43− }, t);
43+ elm.runDelayed(tellTime, t);
44 return clock;
44 return clock;
45 }
45 }
46
46