Skip to content

Commit

Permalink
Clean up code
Browse files Browse the repository at this point in the history
  • Loading branch information
gosolivs committed May 10, 2019
1 parent 21b6b4d commit 0738ab3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,11 @@ var crossTab = function (config) {
return state
})

store.on('@changed', function (state, event) {
if (skipInit) return skipInit = false
store.on('@changed', function (state) {
if (skipInit) {
skipInit = false
return
}

try {
localStorage.setItem(key, JSON.stringify(state))
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"size-limit": [
{
"path": "index.js",
"limit": "100 B"
"limit": "165 B"
}
],
"lint-staged": {
Expand Down

0 comments on commit 0738ab3

Please sign in to comment.