Merge pull request #2882 from ethereum/folder-delete

Fix Update UI After Folder Delete
pull/262/head
yann300 5 years ago committed by GitHub
commit f59019cbe1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 19
      src/app/files/file-explorer.js

@ -241,9 +241,14 @@ function fileExplorer (localRegistry, files, menuItems) {
if (!removeFolder) {
tooltip(`failed to remove ${key}. Make sure the directory is empty before removing it.`)
} else {
const { type } = fileManager.currentFileProvider()
const provider = fileManager.currentFileProvider()
self.updatePath(type)
if (provider) {
const { type } = provider
return self.updatePath(type)
}
self.updatePath('browser')
}
}, () => {})
}
@ -287,8 +292,14 @@ function fileExplorer (localRegistry, files, menuItems) {
if (!removeFile) {
tooltip(`Failed to remove file ${key}.`)
} else {
const { type } = fileManager.currentFileProvider()
self.updatePath(type)
const provider = fileManager.currentFileProvider()
if (provider) {
const { type } = provider
return self.updatePath(type)
}
self.updatePath('browser')
}
},
() => {}

Loading…
Cancel
Save