Skip to content

Commit

Permalink
fix: the tsyringe inject the EditorModel error beacuse of the current…
Browse files Browse the repository at this point in the history
… is undefined (#468)
  • Loading branch information
wewoor authored Oct 13, 2021
1 parent f9d4d64 commit fbb4113
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/model/workbench/editor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export interface IEditor {
/**
* Current editor group
*/
current?: IEditorGroup;
current?: IEditorGroup | null;
/**
* Editor Groups
*/
Expand Down Expand Up @@ -165,13 +165,13 @@ export class EditorGroupModel<E = any, T = any> implements IEditorGroup<E, T> {
}

export class EditorModel implements IEditor {
public current: IEditorGroup | undefined;
public current: IEditorGroup | null;
public groups: IEditorGroup[];
public entry: React.ReactNode;
public editorOptions: IEditorOptions;

constructor(
current: IEditorGroup | undefined = undefined,
current: IEditorGroup | null = null,
groups: IEditorGroup[] = [],
entry: React.ReactNode,
editorOptions: IEditorOptions = BuiltInEditorOptions
Expand Down

0 comments on commit fbb4113

Please sign in to comment.