Merge pull request #5092 from paulkaplan/fix-import-hang
Close importing after failing to import
This commit is contained in:
1 file changed
+7
-5
@@ -141,11 +141,13 @@ class TargetPane extends React.Component {
|
||||
this.props.onShowImporting();
|
||||
handleFileUpload(e.target, (buffer, fileType, fileName, fileIndex, fileCount) => {
|
||||
spriteUpload(buffer, fileType, fileName, storage, newSprite => {
|
||||
this.handleNewSprite(newSprite).then(() => {
|
||||
if (fileIndex === fileCount - 1) {
|
||||
this.props.onCloseImporting();
|
||||
}
|
||||
});
|
||||
this.handleNewSprite(newSprite)
|
||||
.then(() => {
|
||||
if (fileIndex === fileCount - 1) {
|
||||
this.props.onCloseImporting();
|
||||
}
|
||||
})
|
||||
.catch(this.props.onCloseImporting);
|
||||
}, this.props.onCloseImporting);
|
||||
}, this.props.onCloseImporting);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user