fixing null workspace

pull/2710/head
lianahus 3 years ago committed by Aniket
parent 1d27a225ea
commit 94f6ed6ded
  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