create default workspace if no other workspace

pull/2639/head
Aniket-Engg 3 years ago committed by Aniket
parent 7a8a9143f9
commit af7de69487
  1. 5
      libs/remix-ui/workspace/src/lib/actions/workspace.ts

@ -245,9 +245,8 @@ export const switchToWorkspace = async (name: string) => {
dispatch(setMode('localhost'))
plugin.emit('setWorkspace', { name: null, isLocalhost: true })
} else if (name === NO_WORKSPACE) {
await plugin.fileProviders.workspace.clearWorkspace()
await plugin.setWorkspace({ name: null, isLocalhost: false })
dispatch(setCurrentWorkspace(null))
// if there is no other workspace, create remix default workspace
await createWorkspace('default_workspace', 'remixDefault')
} else {
const isActive = await plugin.call('manager', 'isActive', 'remixd')

Loading…
Cancel
Save