mirror of
https://github.com/arduino/arduino-ide.git
synced 2025-07-12 13:56:34 +00:00
fix: editor widget resolving when creating new tab
An already opened editor widget can resolve without waiting. Closes #1718 Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
This commit is contained in:
parent
fe3fbb189c
commit
8778d70ad7
@ -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);
|
||||
}
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user