Skip to content

Commit

Permalink
fix: example breaks functionality
Browse files Browse the repository at this point in the history
vuex-persist restoration breaks because of `window.onNuxtReady` as reported in #119.

A lot of people may fall prey to this broken example. Its also a bit tricky to debug.
  • Loading branch information
kamikazechaser committed Feb 3, 2020
1 parent 4dd4640 commit d5d964b
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,11 +137,9 @@ export default {
import VuexPersistence from 'vuex-persist'

export default ({ store }) => {
window.onNuxtReady(() => {
new VuexPersistence({
/* your options */
}).plugin(store);
});
new VuexPersistence({
/* your options */
}).plugin(store);
}
```

Expand Down

0 comments on commit d5d964b

Please sign in to comment.