{"action":"created","issue":{"url":"https://api.github.com/repos/mesqueeb/vuex-easy-firestore/issues/159","repository_url":"https://api.github.com/repos/mesqueeb/vuex-easy-firestore","labels_url":"https://api.github.com/repos/mesqueeb/vuex-easy-firestore/issues/159/labels{/name}","comments_url":"https://api.github.com/repos/mesqueeb/vuex-easy-firestore/issues/159/comments","events_url":"https://api.github.com/repos/mesqueeb/vuex-easy-firestore/issues/159/events","html_url":"https://github.com/mesqueeb/vuex-easy-firestore/issues/159","id":408705536,"node_id":"MDU6SXNzdWU0MDg3MDU1MzY=","number":159,"title":"Cannot read property 'docLimit' of undefined","user":{"login":"Adrear","id":22615625,"node_id":"MDQ6VXNlcjIyNjE1NjI1","avatar_url":"https://avatars3.githubusercontent.com/u/22615625?v=4","gravatar_id":"","url":"https://api.github.com/users/Adrear","html_url":"https://github.com/Adrear","followers_url":"https://api.github.com/users/Adrear/followers","following_url":"https://api.github.com/users/Adrear/following{/other_user}","gists_url":"https://api.github.com/users/Adrear/gists{/gist_id}","starred_url":"https://api.github.com/users/Adrear/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Adrear/subscriptions","organizations_url":"https://api.github.com/users/Adrear/orgs","repos_url":"https://api.github.com/users/Adrear/repos","events_url":"https://api.github.com/users/Adrear/events{/privacy}","received_events_url":"https://api.github.com/users/Adrear/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2019-02-11T10:00:39Z","updated_at":"2019-02-12T14:45:33Z","closed_at":null,"author_association":"NONE","body":"l like your idea and I want to play with it. But I cannot connect your plugin to my NUXT project. \r\nI get the same error every time. \"Cannot read property 'docLimit' of undefined\"\r\n\r\n**_store/index.js_**\r\n```\r\nimport createEasyFirestore from \"vuex-easy-firestore\"\r\nconst myModule = {\r\n  firestorePath: 'userDocs/{userId}',\r\n  firestoreRefType: 'collection', // or 'doc'\r\n  moduleName: 'userData',\r\n  statePropName: 'data',\r\n  namespaced: true\r\n}\r\nconst easyFirestore = createEasyFirestore(myModule, { logging: true })\r\nexport const plugins = [easyFirestore]\r\nexport const state = () => ({\r\n  items: []\r\n})\r\nexport const mutations = {\r\n  items(state, items) { state.items = items }\r\n}\r\nexport const getters = {\r\n  items: state => state.items\r\n}\r\n```\r\n**_pages/login.vue_**\r\n```login() {\r\nauth.signInWithEmailAndPassword(this.email, this.password).then((user) => {\r\n        if (user) {\r\n          this.$store.dispatch('userData/openDBChannel', { clearModule: true })\r\n             .catch(console.error)\r\n          }\r\n        this.$router.push('/')\r\n      }).catch((error) => {\r\n      })\r\n    }```\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/mesqueeb/vuex-easy-firestore/issues/comments/462786469","html_url":"https://github.com/mesqueeb/vuex-easy-firestore/issues/159#issuecomment-462786469","issue_url":"https://api.github.com/repos/mesqueeb/vuex-easy-firestore/issues/159","id":462786469,"node_id":"MDEyOklzc3VlQ29tbWVudDQ2Mjc4NjQ2OQ==","user":{"login":"eugenepentland","id":32426720,"node_id":"MDQ6VXNlcjMyNDI2NzIw","avatar_url":"https://avatars3.githubusercontent.com/u/32426720?v=4","gravatar_id":"","url":"https://api.github.com/users/eugenepentland","html_url":"https://github.com/eugenepentland","followers_url":"https://api.github.com/users/eugenepentland/followers","following_url":"https://api.github.com/users/eugenepentland/following{/other_user}","gists_url":"https://api.github.com/users/eugenepentland/gists{/gist_id}","starred_url":"https://api.github.com/users/eugenepentland/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eugenepentland/subscriptions","organizations_url":"https://api.github.com/users/eugenepentland/orgs","repos_url":"https://api.github.com/users/eugenepentland/repos","events_url":"https://api.github.com/users/eugenepentland/events{/privacy}","received_events_url":"https://api.github.com/users/eugenepentland/received_events","type":"User","site_admin":false},"created_at":"2019-02-12T14:45:33Z","updated_at":"2019-02-12T14:45:33Z","author_association":"NONE","body":"@Adrear it has to do with it not reading the default values for the module. When I copied the default values in, I was able to get passed that, but then it had an error with the getters. I am working on trying to get it work with Nuxt as well.\r\n\r\nAdding sync: { docLimit: 50} got passed that error.\r\n\r\n```\r\nconst module = {\r\n  firestorePath: '',\r\n  firestoreRefType: '',\r\n  moduleName: '',\r\n  statePropName: '',\r\n  logging: false,\r\n  sync: {\r\n    where: [],\r\n    orderBy: [],\r\n    fillables: [],\r\n    guard: [],\r\n    defaultValues: {},\r\n    preventInitialDocInsertion: false,\r\n    debounceTimerMs: 1000,\r\n    insertHook: function (updateStore, doc, store) { return updateStore(doc) },\r\n    patchHook: function (updateStore, doc, store) { return updateStore(doc) },\r\n    deleteHook: function (updateStore, id, store) { return updateStore(id) },\r\n    insertBatchHook: function (updateStore, docs, store) { return updateStore(docs) },\r\n    patchBatchHook: function (updateStore, doc, ids, store) { return updateStore(doc, ids) },\r\n    deleteBatchHook: function (updateStore, ids, store) { return updateStore(ids) },\r\n  },\r\n  serverChange: {\r\n    defaultValues: {}, // depreciated\r\n    convertTimestamps: {},\r\n    addedHook: function (updateStore, doc, id, store) { return updateStore(doc) },\r\n    modifiedHook: function (updateStore, doc, id, store) { return updateStore(doc) },\r\n    removedHook: function (updateStore, doc, id, store) { return updateStore(doc) },\r\n  },\r\n  fetch: {\r\n    // The max amount of documents to be fetched. Defaults to 50.\r\n    docLimit: 50,\r\n  }\r\n}\r\n}"}}
{"actor":{"display_login":"eugenepentland"}}