Skip to content

Commit

Permalink
fix(module: code-editor): fix wrong initialization with diff mode (NG…
Browse files Browse the repository at this point in the history
…-ZORRO#4485) (NG-ZORRO#4532)

Co-authored-by: simplejason <[email protected]>
  • Loading branch information
2 people authored and vthinkxie committed Jan 6, 2020
1 parent 4cf1f4b commit 7934fe3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions components/code-editor/nz-code-editor.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -213,9 +213,10 @@ export class NzCodeEditorComponent implements OnDestroy, AfterViewInit {
} else {
const language = (this.editorOptionCached as EditorOptions).language;
(this.editorInstance as IDiffEditor).setModel({
original: monaco.editor.createModel(this.value, language),
modified: monaco.editor.createModel(this.nzOriginalText, language)
original: monaco.editor.createModel(this.nzOriginalText, language),
modified: monaco.editor.createModel(this.value, language)
});
this.modelSet = true;
}
}
}
Expand Down

0 comments on commit 7934fe3

Please sign in to comment.