-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix for bug 247937 #242
Fix for bug 247937 #242
Conversation
src/igcontrolbase/igcontrolbase.ts
Outdated
@@ -230,6 +230,9 @@ export class IgControlBase<Model> implements DoCheck { | |||
if (o1 === o2) { return true; } | |||
if (o1 === null || o2 === null) { return false; } | |||
if (o1 !== o1 && o2 !== o2) { return true; }// NaN === NaN | |||
if (o1.nodeName) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tbelcheva The fix is ok, however there might be a case where the customer object has "nodeName" property and in this case the equalsDiff will not work. Please add some more conditions in order to make sure that this is indeed a DOM node. Here is some suggestion: https://stackoverflow.com/questions/384286/javascript-isdom-how-do-you-check-if-a-javascript-object-is-a-dom-object
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also please add a test to cover the newly added code for this scenario.
tests/unit/iggrid/grid.spec.ts
Outdated
} | ||
}); | ||
TestBed.compileComponents().then(() => { | ||
debugger; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove the debugger.
src/igcontrolbase/igcontrolbase.ts
Outdated
@@ -230,6 +230,13 @@ export class IgControlBase<Model> implements DoCheck { | |||
if (o1 === o2) { return true; } | |||
if (o1 === null || o2 === null) { return false; } | |||
if (o1 !== o1 && o2 !== o2) { return true; }// NaN === NaN | |||
var isDOMnode = typeof Node === "object" ? o1 instanceof Node : |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tbelcheva Please put all the code in a separate function(s) and also add tests for them.
No description provided.