fixing null workspace

pull/5370/head
lianahus 2 years ago committed by Aniket
parent 8363d46057
commit 9d8b7eeeba
  1. 2
      apps/remix-ide/src/app/panels/file-panel.js
  2. 6
      libs/remix-ui/search/src/lib/context/context.tsx

@ -57,7 +57,7 @@ module.exports = class Filepanel extends ViewPlugin {
this.slitherHandle = new SlitherHandle()
this.workspaces = []
this.appManager = appManager
this.currentWorkspaceMetadata = {}
this.currentWorkspaceMetadata = null
}
render () {

@ -338,8 +338,10 @@ export const SearchProvider = ({
async function fetchWorkspace() {
try {
const workspace = await plugin.call('filePanel', 'getCurrentWorkspace')
if (workspace) value.setCurrentWorkspace(workspace.name)
setFiles(await getDirectory('/', plugin))
if (workspace) {
value.setCurrentWorkspace(workspace.name)
setFiles(await getDirectory('/', plugin))
}
} catch (e) {
console.log(e)
}

Loading…
Cancel
Save