diff --git a/src/app/files/file-explorer.js b/src/app/files/file-explorer.js index 2e43d70533..19b678182f 100644 --- a/src/app/files/file-explorer.js +++ b/src/app/files/file-explorer.js @@ -104,7 +104,7 @@ function fileExplorer (localRegistry, files, menuItems) { self.ensureRoot(() => { const folderpath = filepath.split('/').slice(0, -1).join('/') const currentTree = self.treeView.nodeAt(folderpath) - + if (currentTree && self.treeView.isExpanded(folderpath)) { self.files.resolveDirectory(folderpath, (error, fileTree) => { if (error) console.error(error) diff --git a/src/app/files/remixDProvider.js b/src/app/files/remixDProvider.js index 7f3ffed5f8..2d0a46a13d 100644 --- a/src/app/files/remixDProvider.js +++ b/src/app/files/remixDProvider.js @@ -70,10 +70,10 @@ module.exports = class RemixDProvider { return this._appManager.call('remixd', 'exists', { path: unprefixedpath }) .then((result) => { - if(cb) return cb(null, result) + if (cb) return cb(null, result) return result }).catch((error) => { - if(cb) return cb(error) + if (cb) return cb(error) throw new Error(error) }) }