1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Fix error in EditResource (#5484)

This commit is contained in:
Sebastian Malton 2022-05-27 13:08:49 -07:00 committed by GitHub
parent b0d6465694
commit c62333f334
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -45,8 +45,8 @@ class NonInjectedEditResource extends React.Component<EditResourceProps & Depend
const tabData = this.props.editResourceStore.getData(this.props.tab.id); const tabData = this.props.editResourceStore.getData(this.props.tab.id);
const obj = this.resource; const obj = this.resource;
if (!obj) { if (!obj && store) {
if (store?.isLoaded) { if (store.isLoaded) {
// auto-close tab when resource removed from store // auto-close tab when resource removed from store
this.props.closeTab(this.props.tab.id); this.props.closeTab(this.props.tab.id);
} else if (!store.isLoading) { } else if (!store.isLoading) {