Skip to content
This repository was archived by the owner on Feb 14, 2023. It is now read-only.

Commit dffdea2

Browse files
author
Charles Stover - Vendor
committed
resolves #28
1 parent 7fcd94c commit dffdea2

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "reactn",
3-
"version": "0.1.7",
3+
"version": "0.1.8",
44
"author": "Charles Stover <[email protected]>",
55
"description": "React, but with built-in global state management.",
66
"license": "MIT",

src/global-state-manager.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,16 @@ class GlobalStateManager {
5454

5555
// Unmap a component instance from all state properties.
5656
removePropertyListener(propertyListener) {
57+
58+
// Remove this property listener from the global state.
5759
for (const propertyListeners of this._propertyListeners.values()) {
5860
propertyListeners.delete(propertyListener);
5961
}
62+
63+
// Remove this property listener from currently-executing transactions.
64+
for (const transaction of this._transactions.values()) {
65+
transaction.propertyListeners.delete(propertyListener);
66+
}
6067
}
6168

6269
// Reset the global state.

0 commit comments

Comments
 (0)