Skip to content

Commit

Permalink
🐛 Deinitialize store when disconnected
Browse files Browse the repository at this point in the history
  • Loading branch information
NeoLegends committed Jan 15, 2018
1 parent b9f5160 commit 1cc6440
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "fit-html",
"version": "0.4.0",
"version": "0.4.1",
"description": "5KB functional Web Components without bloat",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down
1 change: 1 addition & 0 deletions src/connect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ export default function connect<S, SP, DP, OP = {}>(

disconnectedCallback() {
this._unsubscribe();
this._store = undefined!;
}

enqueueRender() {
Expand Down

0 comments on commit 1cc6440

Please sign in to comment.