Skip to content
This repository was archived by the owner on Feb 4, 2022. It is now read-only.
This repository was archived by the owner on Feb 4, 2022. It is now read-only.

nuxt TypeError: Cannot read property 'get' of undefined #134

@jjjachyty

Description

@jjjachyty

Do you want to request a feature or report a bug?
bug
What is the current behavior?

when i use in nuxt ,like this

sessionStorage.js
import createPersistedState from 'vuex-persistedstate'

export default ({store, isHMR, isServer, isClient}) => {
  if (isHMR) return

  if (isClient) {
    window.onNuxtReady((nuxt) => {
      createPersistedState()(store) // vuex plugins can be connected to store, even after creation
    })
  }
}

nuxt.config.js

  plugins: [
    { src: '~/plugins/sessionStorage.js', ssr: false }
  ],


1523351366904

If the current behavior is a bug, please provide the steps to reproduce.

What is the expected behavior?

If this is a feature request, what is motivation or use case for changing the behavior?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions