Skip to content

Commit

Permalink
fix: editor widget resolving when creating new tab
Browse files Browse the repository at this point in the history
An already opened editor widget can resolve without waiting.

Closes #1718

Signed-off-by: Akos Kitta <[email protected]>
  • Loading branch information
Akos Kitta authored and kittaakos committed Nov 29, 2022
1 parent fe3fbb1 commit 8778d70
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ export class OpenSketchFiles extends SketchContribution {
// The editor is expected to be attached to the shell and visible in the UI.
// The deferred promise does not have to wait for the `editorManager#onCreated` event.
// It can resolve earlier.
if (!widget) {
if (widget) {
deferred.resolve(editorWidget);
}
});
Expand Down

0 comments on commit 8778d70

Please sign in to comment.