Merge branch 'master' into panels

pull/1857/head
bunsenstraat 3 years ago committed by GitHub
commit bc7aa544b3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      libs/remix-ui/workspace/src/lib/reducers/workspace.ts

@ -672,9 +672,11 @@ const fetchDirectoryContent = (state: BrowserState, payload: { fileTree, path: s
return files return files
} }
} else { } else {
if (payload.path === state.mode || payload.path === '/') { if (payload.path === '/') {
const files = normalize(payload.fileTree, payload.path, payload.type)
return { [state.mode]: files }
} else if (payload.path === state.mode) {
let files = normalize(payload.fileTree, payload.path, payload.type) let files = normalize(payload.fileTree, payload.path, payload.type)
files = _.merge(files, state[state.mode].files[state.mode]) files = _.merge(files, state[state.mode].files[state.mode])
if (deletePath) delete files[deletePath] if (deletePath) delete files[deletePath]
return { [state.mode]: files } return { [state.mode]: files }

Loading…
Cancel
Save