Merge pull request #1783 from thecodingmachine/fix_freeze_on_mapstore
Fixing a freeze in MapStore on several unsubscribes
This commit is contained in:
commit
f602833c73
@ -96,6 +96,7 @@ export class MapStore<K, V> extends Map<K, V> implements Readable<Map<K, V>> {
|
||||
const unsubscribe = storeByKey.subscribe((newMapValue) => {
|
||||
if (unsubscribeDeepStore) {
|
||||
unsubscribeDeepStore();
|
||||
unsubscribeDeepStore = undefined;
|
||||
}
|
||||
if (newMapValue === undefined) {
|
||||
set(undefined);
|
||||
@ -115,6 +116,7 @@ export class MapStore<K, V> extends Map<K, V> implements Readable<Map<K, V>> {
|
||||
unsubscribe();
|
||||
if (unsubscribeDeepStore) {
|
||||
unsubscribeDeepStore();
|
||||
unsubscribeDeepStore = undefined;
|
||||
}
|
||||
};
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user