Merge branch 'master' of github.com:thecodingmachine/workadventure into develop

This commit is contained in:
David Négrier 2022-01-28 10:16:59 +01:00
commit dd920c96db

View File

@ -96,6 +96,7 @@ export class MapStore<K, V> extends Map<K, V> implements Readable<Map<K, V>> {
const unsubscribe = storeByKey.subscribe((newMapValue) => { const unsubscribe = storeByKey.subscribe((newMapValue) => {
if (unsubscribeDeepStore) { if (unsubscribeDeepStore) {
unsubscribeDeepStore(); unsubscribeDeepStore();
unsubscribeDeepStore = undefined;
} }
if (newMapValue === undefined) { if (newMapValue === undefined) {
set(undefined); set(undefined);
@ -115,6 +116,7 @@ export class MapStore<K, V> extends Map<K, V> implements Readable<Map<K, V>> {
unsubscribe(); unsubscribe();
if (unsubscribeDeepStore) { if (unsubscribeDeepStore) {
unsubscribeDeepStore(); unsubscribeDeepStore();
unsubscribeDeepStore = undefined;
} }
}; };
}); });