fixed issue when using 'open in app' while app is closed
This commit is contained in:
parent
42ff86c572
commit
64ed191a9d
1 changed files with 10 additions and 1 deletions
11
ui/store.js
11
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();
|
||||
|
|
Loading…
Add table
Reference in a new issue