fixed issue when using 'open in app' while app is closed

This commit is contained in:
Dalton 2020-02-06 22:49:28 -06:00 committed by Sean Yesmunt
parent 42ff86c572
commit 64ed191a9d

View file

@ -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();