fixed obvious === bug
This commit is contained in:
parent
b9abf862dd
commit
6821a350f4
1 changed files with 9 additions and 6 deletions
|
@ -46,19 +46,22 @@ Elm.Native.Keyboard = function(elm) {
|
||||||
this.recv = function(timestep, changed, parentID) {
|
this.recv = function(timestep, changed, parentID) {
|
||||||
++count;
|
++count;
|
||||||
if (changed) {
|
if (changed) {
|
||||||
|
// We know this a change must only be one of the following cases
|
||||||
|
if (parentID === down.id && !(NList.member(down.value)(this.value))) {
|
||||||
isChanged = true;
|
isChanged = true;
|
||||||
// We know that a change must only be one of the following cases
|
|
||||||
if (parentID = down.id && !(NList.member(down.value)(this.value))) {
|
|
||||||
this.value = NList.Cons(down.value, this.value);
|
this.value = NList.Cons(down.value, this.value);
|
||||||
} else if (parentID = up.id) {
|
}
|
||||||
|
if (parentID === up.id) {
|
||||||
|
isChanged = true;
|
||||||
var notEq = function(kc) { return kc !== up.value };
|
var notEq = function(kc) { return kc !== up.value };
|
||||||
this.value = NList.filter(notEq)(this.value);
|
this.value = NList.filter(notEq)(this.value);
|
||||||
} else if (parentID = blur.id) {
|
}
|
||||||
|
if (parentID === blur.id) {
|
||||||
|
isChanged = true;
|
||||||
this.value = NList.Nil;
|
this.value = NList.Nil;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (count == n) {
|
if (count == n) {
|
||||||
console.log(this.value);
|
|
||||||
send(this, timestep, isChanged);
|
send(this, timestep, isChanged);
|
||||||
isChanged = false;
|
isChanged = false;
|
||||||
count = 0;
|
count = 0;
|
||||||
|
|
Loading…
Reference in a new issue