fix: use correct this.store format in all components (#827)
This commit is contained in:
parent
bf9ba22c35
commit
4ca5b4611f
|
@ -126,7 +126,7 @@
|
|||
return
|
||||
}
|
||||
media[index].description = rawText
|
||||
store.setComposeData(realm, { media })
|
||||
this.store.setComposeData(realm, { media })
|
||||
saveStore()
|
||||
}, { init: false })
|
||||
},
|
||||
|
|
|
@ -4,13 +4,14 @@
|
|||
import { goto } from '../../../__sapper__/client'
|
||||
|
||||
export default {
|
||||
store: () => store,
|
||||
oncreate () {
|
||||
let accessToken = location.search.match(/accessToken=([^&]+)/)[1]
|
||||
let instanceName = location.search.match(/instanceName=([^&]+)/)[1]
|
||||
let {
|
||||
loggedInInstances,
|
||||
loggedInInstancesInOrder
|
||||
} = store.get()
|
||||
} = this.store.get()
|
||||
|
||||
loggedInInstances[instanceName] = {
|
||||
access_token: accessToken
|
||||
|
@ -20,12 +21,12 @@
|
|||
loggedInInstancesInOrder.push(instanceName)
|
||||
}
|
||||
|
||||
store.set({
|
||||
this.store.set({
|
||||
currentInstance: instanceName,
|
||||
loggedInInstances,
|
||||
loggedInInstancesInOrder
|
||||
})
|
||||
store.save()
|
||||
this.store.save()
|
||||
goto('/')
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue