on master help sign in
fixed obvious === bug
commit6821a350f4caf58388c4da78aeb1697b47512f49 authorJohn P Mayer Jr <john.p.mayer.jr@gmail.com> dateThu 15 Aug 2013, 05:55 (13 years ago) parentb9abf86
1 file changed+9−6
libraries/Native/Signal/Keyboard.js+9−6
libraries/Native/Signal/Keyboard.js+9−6
@@ -46,19 +46,22 @@ Elm.Native.Keyboard = function(elm) {
4646 this.recv = function(timestep, changed, parentID) {
4747 ++count;
4848 if (changed) {
49− isChanged = true;
50− // We know that a change must only be one of the following cases
51− if (parentID = down.id && !(NList.member(down.value)(this.value))) {
49+ // We know this a change must only be one of the following cases
50+ if (parentID === down.id && !(NList.member(down.value)(this.value))) {
51+ isChanged = true;
5252 this.value = NList.Cons(down.value, this.value);
53− } else if (parentID = up.id) {
53+ }
54+ if (parentID === up.id) {
55+ isChanged = true;
5456 var notEq = function(kc) { return kc !== up.value };
5557 this.value = NList.filter(notEq)(this.value);
56− } else if (parentID = blur.id) {
58+ }
59+ if (parentID === blur.id) {
60+ isChanged = true;
5761 this.value = NList.Nil;
5862 }
5963 }
6064 if (count == n) {
61− console.log(this.value);
6265 send(this, timestep, isChanged);
6366 isChanged = false;
6467 count = 0;