|
|
@ -20,8 +20,11 @@ function migrateFromSnapshotsToDiffs(longHistory) { |
|
|
|
) |
|
|
|
) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function generateHistoryEntry(previousState, newState) { |
|
|
|
function generateHistoryEntry(previousState, newState, note) { |
|
|
|
return jsonDiffer.compare(previousState, newState) |
|
|
|
const entry = jsonDiffer.compare(previousState, newState) |
|
|
|
|
|
|
|
// Add a note to the first op, since it breaks if we append it to the entry
|
|
|
|
|
|
|
|
if (note && entry[0]) entry[0].note = note |
|
|
|
|
|
|
|
return entry |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function replayHistory(shortHistory) { |
|
|
|
function replayHistory(shortHistory) { |
|
|
|