fix safari

This commit is contained in:
Nolan Lawson 2018-02-19 20:15:24 -08:00
parent 8b632f91f2
commit 17330ed621
2 changed files with 8 additions and 5 deletions

View file

@ -22,7 +22,7 @@ class PinaforeStore extends LocalStorageStore {
}
}
const store = new PinaforeStore({
export const store = new PinaforeStore({
instanceNameInSearch: '',
queryInSearch: '',
currentInstance: null,
@ -41,10 +41,11 @@ const store = new PinaforeStore({
mixins(PinaforeStore)
computations(store)
observers(store)
export function initStore() {
observers(store)
}
if (process.browser && process.env.NODE_ENV !== 'production') {
window.store = store // for debugging
}
export { store }
}

View file

@ -1,4 +1,5 @@
import { init } from 'sapper/runtime.js'
import { initStore } from '../routes/_store/store'
import { loadPolyfills } from '../routes/_utils/loadPolyfills'
import '../routes/_utils/offlineNotification'
import '../routes/_utils/serviceWorkerClient'
@ -7,5 +8,6 @@ import '../routes/_utils/loadingMask'
loadPolyfills().then(() => {
// `routes` is an array of route objects injected by Sapper
initStore()
init(document.querySelector('#sapper'), __routes__)
})