fix safari
This commit is contained in:
parent
8b632f91f2
commit
17330ed621
|
@ -22,7 +22,7 @@ class PinaforeStore extends LocalStorageStore {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const store = new PinaforeStore({
|
export const store = new PinaforeStore({
|
||||||
instanceNameInSearch: '',
|
instanceNameInSearch: '',
|
||||||
queryInSearch: '',
|
queryInSearch: '',
|
||||||
currentInstance: null,
|
currentInstance: null,
|
||||||
|
@ -41,10 +41,11 @@ const store = new PinaforeStore({
|
||||||
|
|
||||||
mixins(PinaforeStore)
|
mixins(PinaforeStore)
|
||||||
computations(store)
|
computations(store)
|
||||||
observers(store)
|
|
||||||
|
export function initStore() {
|
||||||
|
observers(store)
|
||||||
|
}
|
||||||
|
|
||||||
if (process.browser && process.env.NODE_ENV !== 'production') {
|
if (process.browser && process.env.NODE_ENV !== 'production') {
|
||||||
window.store = store // for debugging
|
window.store = store // for debugging
|
||||||
}
|
}
|
||||||
|
|
||||||
export { store }
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import { init } from 'sapper/runtime.js'
|
import { init } from 'sapper/runtime.js'
|
||||||
|
import { initStore } from '../routes/_store/store'
|
||||||
import { loadPolyfills } from '../routes/_utils/loadPolyfills'
|
import { loadPolyfills } from '../routes/_utils/loadPolyfills'
|
||||||
import '../routes/_utils/offlineNotification'
|
import '../routes/_utils/offlineNotification'
|
||||||
import '../routes/_utils/serviceWorkerClient'
|
import '../routes/_utils/serviceWorkerClient'
|
||||||
|
@ -7,5 +8,6 @@ import '../routes/_utils/loadingMask'
|
||||||
|
|
||||||
loadPolyfills().then(() => {
|
loadPolyfills().then(() => {
|
||||||
// `routes` is an array of route objects injected by Sapper
|
// `routes` is an array of route objects injected by Sapper
|
||||||
|
initStore()
|
||||||
init(document.querySelector('#sapper'), __routes__)
|
init(document.querySelector('#sapper'), __routes__)
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue