From 64ed191a9dee9c42334d71f4e278e46b3676c246 Mon Sep 17 00:00:00 2001 From: Dalton Date: Thu, 6 Feb 2020 22:49:28 -0600 Subject: [PATCH] fixed issue when using 'open in app' while app is closed --- ui/store.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/ui/store.js b/ui/store.js index af642c6cc..a828c56db 100644 --- a/ui/store.js +++ b/ui/store.js @@ -96,7 +96,16 @@ const persistOptions = { let history; // @if TARGET='app' -history = createMemoryHistory(); +let initialEntry = '/'; +let hash = window.location.hash; +if (hash) { + hash = hash.replace('#', ''); + initialEntry = hash.startsWith('/') ? hash : '/' + hash; +} +history = createMemoryHistory({ + initialEntries: [initialEntry], + initialIndex: 0, +}); // @endif // @if TARGET='web' history = createBrowserHistory();