Created
January 12, 2014 15:07
-
-
Save beyond-code-github/8385785 to your computer and use it in GitHub Desktop.
Highlighted portion of example illustrating how we deal with wholesale replacement of a complex object within an observable
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
if ((typeof obj == "object") && (obj !== null)) { | |
if (target.hasValueChanged()) { | |
return ko.mapping.toJS(obj); | |
} | |
return getChangesFromModel(obj); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment