Fix resource lists auto-refresh

Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com>
This commit is contained in:
Lauri Nevala committed 2020-06-11 16:01:12 +03:00
1 parent 0888ad8c5d
commit 4eefd900e9
1 file changed
+1 -2
@@ -117,12 +117,11 @@ export class ItemListLayout extends React.Component<ItemListLayoutProps> {
try {
await Promise.all(stores.map(store => store.loadAll()));
const subscriptions = stores.map(store => store.subscribe());
await when(() => this.isUnmounting);
subscriptions.forEach(dispose => dispose()); // unsubscribe all
} catch(error) {
console.log("catched", error)
}
await when(() => this.isUnmounting);
}
componentWillUnmount() {