Skip to content
This repository has been archived by the owner on Jan 20, 2018. It is now read-only.

Commit

Permalink
fix swap event when elm-make debug==false
Browse files Browse the repository at this point in the history
  • Loading branch information
fluxxu committed Nov 21, 2016
1 parent 3b38497 commit 85946eb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion hmr.js
Expand Up @@ -147,7 +147,9 @@ if (module.hot) {
instance.callbacks.forEach(function (cb) {
cb(event, {
flags: instance.flags,
state: instance.lastState._0
state: '_0' in instance.lastState
? instance.lastState._0 //debugger state
: instance.lastState //normal state
})
})
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "elm-hot-loader",
"version": "0.5.1",
"version": "0.5.2",
"description": "",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit 85946eb

Please sign in to comment.