Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
toggle (key) {
if (LocalStorage.has(key)) {
LocalStorage.remove(key)
}
else {
LocalStorage.set(key, `${key}-value`)
}
this.update()
},
clear () {
created () {
if (!LocalStorage.has('lists')) {
LocalStorage.set('lists', [])
}
this.$root.lists = LocalStorage.get.item('lists')
},
methods: {
mounted () {
if (LocalStorage.has('chosen')) {
dispatch({type: 'LOAD_LOCAL_CHOSEN'})
}
if (!this.state.spells.loaded) {
fetchSpells()
}
}
}