Skip to content

Commit fbb4113

Browse files
authored
fix: the tsyringe inject the EditorModel error beacuse of the current is undefined (#468)
1 parent f9d4d64 commit fbb4113

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/model/workbench/editor.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ export interface IEditor {
6464
/**
6565
* Current editor group
6666
*/
67-
current?: IEditorGroup;
67+
current?: IEditorGroup | null;
6868
/**
6969
* Editor Groups
7070
*/
@@ -165,13 +165,13 @@ export class EditorGroupModel<E = any, T = any> implements IEditorGroup<E, T> {
165165
}
166166

167167
export class EditorModel implements IEditor {
168-
public current: IEditorGroup | undefined;
168+
public current: IEditorGroup | null;
169169
public groups: IEditorGroup[];
170170
public entry: React.ReactNode;
171171
public editorOptions: IEditorOptions;
172172

173173
constructor(
174-
current: IEditorGroup | undefined = undefined,
174+
current: IEditorGroup | null = null,
175175
groups: IEditorGroup[] = [],
176176
entry: React.ReactNode,
177177
editorOptions: IEditorOptions = BuiltInEditorOptions

0 commit comments

Comments
 (0)