mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-13 09:12:52 +00:00
Add method to get stored JSON history from outside coreHistory object (re: b4ef0862978ae79a5cb741ac49370ed678857b1f)
This commit is contained in:
@@ -676,6 +676,11 @@ export function coreHistory(context) {
|
||||
},
|
||||
|
||||
|
||||
savedHistoryJSON: function() {
|
||||
return context.storage(getKey('saved_history'));
|
||||
},
|
||||
|
||||
|
||||
hasRestorableChanges: function() {
|
||||
return _hasUnresolvedRestorableChanges;
|
||||
},
|
||||
@@ -685,7 +690,7 @@ export function coreHistory(context) {
|
||||
restore: function() {
|
||||
if (lock.locked()) {
|
||||
_hasUnresolvedRestorableChanges = false;
|
||||
var json = context.storage(getKey('saved_history'));
|
||||
var json = this.savedHistoryJSON();
|
||||
if (json) history.fromJSON(json, true);
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user