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

This commit is contained in:
Saturnino Abril
2017-07-31 11:36:46 -04:00
committed by Harrison Healey
parent 094c2f7308
commit c130d3630b
+1 -1
View File
@@ -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)