mirror of
https://github.com/nasa/openmct.git
synced 2025-04-07 19:34:25 +00:00
[Core] Revise explicit setting of modified timestamp
Allow undefined as an explicit value for a domain object's modification timestamp (as set via the mutation capability.) Avoids a bug in minimal auto-refresh, being added for WTD-1221.
This commit is contained in:
parent
28805cd55c
commit
e452921729
@ -77,7 +77,8 @@ define(
|
||||
// Get the object's model and clone it, so the
|
||||
// mutator function has a temporary copy to work with.
|
||||
var model = domainObject.getModel(),
|
||||
clone = JSON.parse(JSON.stringify(model));
|
||||
clone = JSON.parse(JSON.stringify(model)),
|
||||
useTimestamp = arguments.length > 1;
|
||||
|
||||
// Function to handle copying values to the actual
|
||||
function handleMutation(mutationResult) {
|
||||
@ -94,8 +95,7 @@ define(
|
||||
if (model !== result) {
|
||||
copyValues(model, result);
|
||||
}
|
||||
model.modified = (typeof timestamp === 'number') ?
|
||||
timestamp : now();
|
||||
model.modified = useTimestamp ? timestamp : now();
|
||||
}
|
||||
|
||||
// Report the result of the mutation
|
||||
|
Loading…
x
Reference in New Issue
Block a user