summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSaturnino Abril <saturnino.abril@gmail.com>2017-07-31 23:36:46 +0800
committerHarrison Healey <harrisonmhealey@gmail.com>2017-07-31 11:36:46 -0400
commitc130d3630bb2b00d250bf7769792654e2ffda901 (patch)
tree3b588f3001d6db837baa27db002eda258d6e0bd2
parent094c2f7308c657956e1b60c52747eb90647eac97 (diff)
downloadchat-c130d3630bb2b00d250bf7769792654e2ffda901.tar.gz
chat-c130d3630bb2b00d250bf7769792654e2ffda901.tar.bz2
chat-c130d3630bb2b00d250bf7769792654e2ffda901.zip
prevent ViewImageModal to re-render when file count is unchanged (#7048)
-rw-r--r--webapp/components/view_image.jsx2
1 files changed, 1 insertions, 1 deletions
diff --git a/webapp/components/view_image.jsx b/webapp/components/view_image.jsx
index 04ace6c55..237d0a6dc 100644
--- a/webapp/components/view_image.jsx
+++ b/webapp/components/view_image.jsx
@@ -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)