refactor: optomise if condition for model compose refresh (#429)

This commit is contained in:
stew-ro 2020-07-20 10:04:48 -07:00 коммит произвёл GitHub
Родитель 9cb6c5830a
Коммит dbe663ea6e
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
1 изменённых файлов: 1 добавлений и 2 удалений

Просмотреть файл

@ -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();
}