prevent ViewImageModal to re-render when file count is unchanged (#7048)

Этот коммит содержится в:
Saturnino Abril
2017-07-31 23:36:46 +08:00
коммит произвёл Harrison Healey
родитель 094c2f7308
Коммит c130d3630b

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

@@ -100,7 +100,7 @@ export default class ViewImageModal extends React.Component {
this.onModalHidden();
}
if (this.props.fileInfos !== nextProps.fileInfos) {
if (this.props.fileInfos.length !== nextProps.fileInfos.length) {
this.setState({
loaded: Utils.fillArray(false, nextProps.fileInfos.length),
progress: Utils.fillArray(0, nextProps.fileInfos.length)