Fix resource lists auto-refresh (#447)

Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com>
This commit is contained in:
Lauri Nevala authored and GitHub committed 2020-06-11 16:22:09 +03:00
1 parent 8e514df70e
commit 1fbca3fcd3
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() {