-
-
Save chidumennamdi/0fb4e24f89dcf5eb29bf46befd626534 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export function checkBinding( | |
view: ViewData, def: NodeDef, bindingIdx: number, value: any): boolean { | |
const oldValues = view.oldValues; | |
if ((view.state & ViewState.FirstCheck) || | |
!looseIdentical(oldValues[def.bindingIndex + bindingIdx], value)) { | |
return true; | |
} | |
return false; | |
} | |
| | |
V | |
export function looseIdentical(a: any, b: any): boolean { | |
return a === b || typeof a === 'number' && typeof b === 'number' && isNaN(a) && isNaN(b); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment