fix: use correct this.store format in all components (#827)

This commit is contained in:
Nolan Lawson 2018-12-17 11:28:31 -08:00 committed by GitHub
parent bf9ba22c35
commit 4ca5b4611f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 4 deletions

View File

@ -126,7 +126,7 @@
return
}
media[index].description = rawText
store.setComposeData(realm, { media })
this.store.setComposeData(realm, { media })
saveStore()
}, { init: false })
},

View File

@ -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('/')
}
}