Skip to content

Commit 5b1a5a4

Browse files
authored
Keep gist in a separate workspace at load (#1023)
fix #1022
1 parent 83b0999 commit 5b1a5a4

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

apps/remix-ide/src/app/panels/file-panel.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,9 +135,15 @@ module.exports = class Filepanel extends ViewPlugin {
135135
const gistHandler = new GistHandler()
136136
const params = queryParams.get()
137137
// get the file from gist
138-
const loadedFromGist = gistHandler.loadFromGist(params, this._deps.fileManager)
139-
138+
let loadedFromGist = false
139+
if (params.gist) {
140+
await this.processCreateWorkspace('gist-sample')
141+
this._deps.fileProviders.workspace.setWorkspace('gist-sample')
142+
this.initialWorkspace = 'gist-sample'
143+
loadedFromGist = gistHandler.loadFromGist(params, this._deps.fileManager)
144+
}
140145
if (loadedFromGist) return
146+
141147
if (params.code) {
142148
try {
143149
await this.processCreateWorkspace('code-sample')

0 commit comments

Comments
 (0)