refactor: optomise if condition for model compose refresh (#429)
This commit is contained in:
Родитель
9cb6c5830a
Коммит
dbe663ea6e
|
@ -217,8 +217,7 @@ export default class ModelComposePage extends React.Component<IModelComposePageP
|
|||
}
|
||||
|
||||
public componentDidUpdate(prevProps, prevState) {
|
||||
if ((prevState.isComposing === true &&
|
||||
prevState.isComposing !== this.state.isComposing) || this.state.refreshFlag) {
|
||||
if ((prevState.isComposing && !this.state.isComposing) || this.state.refreshFlag) {
|
||||
if (this.props.project) {
|
||||
this.getModelList();
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче