on master help sign in
Fix bug in which "every" stopped triggering
commit64357d869edba5a9daee6b8f01297d373e58b5a2 authorEvan Czaplicki <info@elm-lang.org> dateThu 17 Apr 2014, 23:52 (13 years ago) parent7d97daa
1 file changed+5−5
libraries/Native/Signal/Time.js+5−5
libraries/Native/Signal/Time.js+5−5
@@ -36,11 +36,11 @@ Elm.Native.Time.make = function(elm) {
3636
3737 function every(t) {
3838 var clock = NS.input(Date.now());
39− var id = elm.runDelayed(function tellTime() {
40− if (elm.notify(clock.id, Date.now())) {
41− elm.runDelayed(tellTime, t);
42− }
43− }, t);
39+ function tellTime() {
40+ elm.notify(clock.id, Date.now());
41+ elm.runDelayed(tellTime, t);
42+ }
43+ elm.runDelayed(tellTime, t);
4444 return clock;
4545 }
4646