make sure the content is not undefined (#18406)

This commit is contained in:
Alan Ren
2022-02-16 13:51:50 -08:00
committed by GitHub
parent 3dbd5ac2c1
commit 7ff42eeb08

View File

@@ -116,7 +116,7 @@ export class DesignerScriptEditor extends BaseTextEditor implements DesignerText
}
private updateEditor(): void {
if (this._editorModel) {
if (this._editorModel && this._content) {
this._modelService.updateModel(this._editorModel, this._content);
this._untitledTextEditorModel.setDirty(false);
this.layout(new DOM.Dimension(this._container.clientWidth, this._container.clientHeight));