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
  • Loading branch information
simplejason authored and hsuanxyz committed Dec 9, 2019
1 parent 80a0b26 commit 09d0a9c
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 09d0a9c

Please sign in to comment.