{"action":"created","issue":{"url":"https://api.github.com/repos/vuejs/vuex/issues/312","repository_url":"https://api.github.com/repos/vuejs/vuex","labels_url":"https://api.github.com/repos/vuejs/vuex/issues/312/labels{/name}","comments_url":"https://api.github.com/repos/vuejs/vuex/issues/312/comments","events_url":"https://api.github.com/repos/vuejs/vuex/issues/312/events","html_url":"https://github.com/vuejs/vuex/issues/312","id":176845549,"number":312,"title":"`hotUpdate` does not guard against adding new modules","user":{"login":"HerringtonDarkholme","id":2883231,"avatar_url":"https://avatars.githubusercontent.com/u/2883231?v=3","gravatar_id":"","url":"https://api.github.com/users/HerringtonDarkholme","html_url":"https://github.com/HerringtonDarkholme","followers_url":"https://api.github.com/users/HerringtonDarkholme/followers","following_url":"https://api.github.com/users/HerringtonDarkholme/following{/other_user}","gists_url":"https://api.github.com/users/HerringtonDarkholme/gists{/gist_id}","starred_url":"https://api.github.com/users/HerringtonDarkholme/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HerringtonDarkholme/subscriptions","organizations_url":"https://api.github.com/users/HerringtonDarkholme/orgs","repos_url":"https://api.github.com/users/HerringtonDarkholme/repos","events_url":"https://api.github.com/users/HerringtonDarkholme/events{/privacy}","received_events_url":"https://api.github.com/users/HerringtonDarkholme/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/vuejs/vuex/labels/2.0","name":"2.0","color":"f9d0c4"},{"url":"https://api.github.com/repos/vuejs/vuex/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2016-09-14T08:27:32Z","updated_at":"2016-09-15T16:16:18Z","closed_at":null,"body":"I think this is an edge case, but it might worth reporting. \r\n\r\nUsing vue@next and vuex@next\r\n\r\n```javascript\r\nvar Vue = require('vue')\r\nvar Vuex = require('vuex')\r\n\r\nVue.use(Vuex)\r\n\r\nvar store = new Vuex.Store({})\r\nstore.hotUpdate({\r\n  modules: {module: {}}\r\n})\r\n\r\n// TypeError: Cannot set property 'module' of undefined\r\n```"},"comment":{"url":"https://api.github.com/repos/vuejs/vuex/issues/comments/247375826","html_url":"https://github.com/vuejs/vuex/issues/312#issuecomment-247375826","issue_url":"https://api.github.com/repos/vuejs/vuex/issues/312","id":247375826,"user":{"login":"ktsn","id":2194624,"avatar_url":"https://avatars.githubusercontent.com/u/2194624?v=3","gravatar_id":"","url":"https://api.github.com/users/ktsn","html_url":"https://github.com/ktsn","followers_url":"https://api.github.com/users/ktsn/followers","following_url":"https://api.github.com/users/ktsn/following{/other_user}","gists_url":"https://api.github.com/users/ktsn/gists{/gist_id}","starred_url":"https://api.github.com/users/ktsn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ktsn/subscriptions","organizations_url":"https://api.github.com/users/ktsn/orgs","repos_url":"https://api.github.com/users/ktsn/repos","events_url":"https://api.github.com/users/ktsn/events{/privacy}","received_events_url":"https://api.github.com/users/ktsn/received_events","type":"User","site_admin":false},"created_at":"2016-09-15T16:16:18Z","updated_at":"2016-09-15T16:16:18Z","body":"I think `hotUpdate` should only **update** modules and it is suitable to provide warning to encourage to reload a browser in this situation because it is difficult to detect removed modules and its state.\r\n\r\nImagine we will rename a module on development. If `hotUpdate` can add a new module, the renamed module is added as a new name but the old-name module is still exist with its state on the store. I think this may make confusion."}}
{"actor":{"display_login":"ktsn"}}