Skip to content

Commit

Permalink
fix: don't use window in created (#59)
Browse files Browse the repository at this point in the history
Error from eslint(nuxt/no-globals-in-created)
  • Loading branch information
tikkeninc authored Jan 25, 2021
1 parent 545497c commit 9b47c6e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/templates/plugin.client.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ export default function (ctx, inject) {
if (this.preference === 'system') {
this._watchMedia()
}
},
mounted () {
if (window.localStorage) {
this._watchStorageChange()
}
Expand Down

0 comments on commit 9b47c6e

Please sign in to comment.