Replaced some equality checks with strict equality checks
This commit is contained in:
parent
1dea979c99
commit
0962067ca9
|
@ -94,7 +94,7 @@ Node.prototype.setParent = function(parent) {
|
||||||
*/
|
*/
|
||||||
Node.prototype.setField = function(field, fieldEditable) {
|
Node.prototype.setField = function(field, fieldEditable) {
|
||||||
this.field = field;
|
this.field = field;
|
||||||
this.fieldEditable = (fieldEditable == true);
|
this.fieldEditable = (fieldEditable === true);
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -282,7 +282,7 @@ Node.prototype.expand = function(recurse) {
|
||||||
|
|
||||||
this.showChilds();
|
this.showChilds();
|
||||||
|
|
||||||
if (recurse != false) {
|
if (recurse !== false) {
|
||||||
this.childs.forEach(function (child) {
|
this.childs.forEach(function (child) {
|
||||||
child.expand(recurse);
|
child.expand(recurse);
|
||||||
});
|
});
|
||||||
|
@ -302,7 +302,7 @@ Node.prototype.collapse = function(recurse) {
|
||||||
this.hideChilds();
|
this.hideChilds();
|
||||||
|
|
||||||
// collapse childs in case of recurse
|
// collapse childs in case of recurse
|
||||||
if (recurse != false) {
|
if (recurse !== false) {
|
||||||
this.childs.forEach(function (child) {
|
this.childs.forEach(function (child) {
|
||||||
child.collapse(recurse);
|
child.collapse(recurse);
|
||||||
});
|
});
|
||||||
|
@ -1006,7 +1006,7 @@ Node.prototype._getDomValue = function(silent) {
|
||||||
catch (err) {
|
catch (err) {
|
||||||
this.value = undefined;
|
this.value = undefined;
|
||||||
// TODO: sent an action with the new, invalid value?
|
// TODO: sent an action with the new, invalid value?
|
||||||
if (silent != true) {
|
if (silent !== true) {
|
||||||
throw err;
|
throw err;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1171,7 +1171,7 @@ Node.prototype._getDomField = function(silent) {
|
||||||
catch (err) {
|
catch (err) {
|
||||||
this.field = undefined;
|
this.field = undefined;
|
||||||
// TODO: sent an action here, with the new, invalid value?
|
// TODO: sent an action here, with the new, invalid value?
|
||||||
if (silent != true) {
|
if (silent !== true) {
|
||||||
throw err;
|
throw err;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1588,12 +1588,12 @@ Node.prototype.updateDom = function (options) {
|
||||||
this._updateDomValue();
|
this._updateDomValue();
|
||||||
|
|
||||||
// update childs indexes
|
// update childs indexes
|
||||||
if (options && options.updateIndexes == true) {
|
if (options && options.updateIndexes === true) {
|
||||||
// updateIndexes is true or undefined
|
// updateIndexes is true or undefined
|
||||||
this._updateDomIndexes();
|
this._updateDomIndexes();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (options && options.recurse == true) {
|
if (options && options.recurse === true) {
|
||||||
// recurse is true or undefined. update childs recursively
|
// recurse is true or undefined. update childs recursively
|
||||||
if (this.childs) {
|
if (this.childs) {
|
||||||
this.childs.forEach(function (child) {
|
this.childs.forEach(function (child) {
|
||||||
|
|
|
@ -258,7 +258,7 @@ exports.stripFormatting = function stripFormatting(divElement) {
|
||||||
if (attributes) {
|
if (attributes) {
|
||||||
for (var j = attributes.length - 1; j >= 0; j--) {
|
for (var j = attributes.length - 1; j >= 0; j--) {
|
||||||
var attribute = attributes[j];
|
var attribute = attributes[j];
|
||||||
if (attribute.specified == true) {
|
if (attribute.specified === true) {
|
||||||
child.removeAttribute(attribute.name);
|
child.removeAttribute(attribute.name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue