diff options
author | Saturnino Abril <saturnino.abril@gmail.com> | 2017-07-31 23:36:46 +0800 |
---|---|---|
committer | Harrison Healey <harrisonmhealey@gmail.com> | 2017-07-31 11:36:46 -0400 |
commit | c130d3630bb2b00d250bf7769792654e2ffda901 (patch) | |
tree | 3b588f3001d6db837baa27db002eda258d6e0bd2 /webapp/components | |
parent | 094c2f7308c657956e1b60c52747eb90647eac97 (diff) | |
download | chat-c130d3630bb2b00d250bf7769792654e2ffda901.tar.gz chat-c130d3630bb2b00d250bf7769792654e2ffda901.tar.bz2 chat-c130d3630bb2b00d250bf7769792654e2ffda901.zip |
prevent ViewImageModal to re-render when file count is unchanged (#7048)
Diffstat (limited to 'webapp/components')
-rw-r--r-- | webapp/components/view_image.jsx | 2 |
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) |