Fix prepare window display moment

This commit is contained in:
Jonathan Grangien
2018-11-09 12:56:26 +01:00
parent 35c43e6cbf
commit 2fca206462

View File

@@ -81,10 +81,9 @@ class PrepareUploadedData extends Component {
DataManager.subscribe('Modules.DataLoader.TransferFunctionPresetsJSON', this.handleTfPresetsJSON);
}
componentDidUpdate(prevProps, prevState) {
componentDidUpdate(prevProps) {
const { selectedFilePaths } = this.props;
// const hasFilePaths = selectedFilePaths.length > 0 && selectedFilePaths[0] !== '';
const hasFilePaths = selectedFilePaths.length > 0;
const hasFilePaths = selectedFilePaths.length > 0 && selectedFilePaths[0] !== '';
const filePathsDiffer = JSON.stringify(selectedFilePaths) !== JSON.stringify(prevProps.selectedFilePaths);
if (hasFilePaths && filePathsDiffer) {