Skip to content

Commit 58d2dfe

Browse files
christianalfoniCompuIves
authored andcommitted
clean double negative (codesandbox#3168)
1 parent fc10d12 commit 58d2dfe

File tree

1 file changed

+3
-3
lines changed
  • packages/app/src/app/overmind/effects/vscode

1 file changed

+3
-3
lines changed

packages/app/src/app/overmind/effects/vscode/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ export class VSCodeEffect {
292292
public async changeSandbox(sandbox: Sandbox, setFs: (fs: SandboxFs) => void) {
293293
await this.initialized;
294294

295-
const isFirstLoad = !!this.modelsHandler;
295+
const isFirstLoad = !this.modelsHandler;
296296

297297
if (this.modelsHandler) {
298298
this.modelsHandler.dispose();
@@ -314,12 +314,12 @@ export class VSCodeEffect {
314314
setFs(this.sandboxFsSync.create(sandbox));
315315

316316
if (isFirstLoad) {
317+
this.sandboxFsSync.sync(() => {});
318+
} else {
317319
this.editorApi.extensionService.stopExtensionHost();
318320
this.sandboxFsSync.sync(() => {
319321
this.editorApi.extensionService.startExtensionHost();
320322
});
321-
} else {
322-
this.sandboxFsSync.sync(() => {});
323323
}
324324
}
325325

0 commit comments

Comments
 (0)