mirror of
https://github.com/koel/koel
synced 2024-11-24 21:23:06 +00:00
Optimize preference store
This commit is contained in:
parent
d83ee5e012
commit
84e9ba269e
1 changed files with 2 additions and 5 deletions
|
@ -43,11 +43,8 @@ export const preferenceStore = {
|
|||
setupProxy () {
|
||||
each(Object.keys(this.state), key => {
|
||||
Object.defineProperty(this, key, {
|
||||
get: () => this.state[key],
|
||||
set: value => {
|
||||
this.state[key] = value
|
||||
this.save()
|
||||
},
|
||||
get: () => this.get(key),
|
||||
set: value => this.set(key, value),
|
||||
configurable: true
|
||||
})
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue