[Core] Update existing specs

Update existing specs for changes from WTD-1033.
This commit is contained in:
Victor Woeltjen
2015-03-24 16:43:50 -07:00
parent 35371f89ab
commit 6e2ec8dbe7
3 changed files with 45 additions and 11 deletions

View File

@ -21,14 +21,9 @@ define(
// Pick a domain object model to use, favoring the one
// with the most recent timestamp
function pick(a, b) {
if (!a) {
return b;
}
if (!b) {
return b;
}
return (a.modified || Number.NEGATIVE_INFINITY) >
(b.modified || Number.NEGATIVE_INFINITY) ? a : b;
var aModified = (a || {}).modified || Number.NEGATIVE_INFINITY,
bModified = (b || {}).modified || Number.NEGATIVE_INFINITY;
return (aModified > bModified) ? a : (b || a);
}
// Merge results from multiple providers into one