diff --git a/src/app/files/basicReadOnlyExplorer.js b/src/app/files/basicReadOnlyExplorer.js index d5a92bdae8..fa3006f53a 100644 --- a/src/app/files/basicReadOnlyExplorer.js +++ b/src/app/files/basicReadOnlyExplorer.js @@ -83,6 +83,7 @@ class BasicReadOnlyExplorer { resolveDirectory (path, callback /* (error, filesList) => { } */) { var self = this if (path[0] === '/') path = path.substring(1) + if (!path) return callback(null, { [self.type]: { } }) var tree = {} // This does not include '.remix.config', because it is filtered // inside list(). diff --git a/src/app/files/file-explorer.js b/src/app/files/file-explorer.js index 48c341995e..15baaf437d 100755 --- a/src/app/files/file-explorer.js +++ b/src/app/files/file-explorer.js @@ -101,8 +101,7 @@ function fileExplorer (appAPI, files) { } }, formatSelf: function formatSelf (key, data, li) { - var isRoot = !data.path.indexOf('browser') && data.path.length === 'browser'.length - isRoot = isRoot || !data.path.indexOf('localhost') && data.path.length === 'localhost'.length + var isRoot = data.path.indexOf('/') === -1 return yo`