From ab278a84dfd37388f33adb7358e003eff9f663b8 Mon Sep 17 00:00:00 2001 From: Quincy Morgan Date: Wed, 15 Jan 2020 13:08:32 -0500 Subject: [PATCH] Add method to get stored JSON history from outside coreHistory object (re: b4ef0862978ae79a5cb741ac49370ed678857b1f) --- modules/core/history.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/core/history.js b/modules/core/history.js index e621c6d92..830962d8d 100644 --- a/modules/core/history.js +++ b/modules/core/history.js @@ -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); } },