materiahq / ngx-monaco-editor

Monaco Editor Library for Angular v6 and above
MIT License
159 stars 35 forks source link

Changes to `original` property not detected properly #100

Open ghost opened 2 years ago

ghost commented 2 years ago

When using the ngx-monaco-diff-editor component, input changes for original are not detected properly.

https://github.com/materiahq/ngx-monaco-editor/blob/952a8658b9ea4d14954a54d9b02af4c955e77587/src/ngx-monaco-editor/src/lib/components/monaco-diff-editor/monaco-diff-editor.component.ts#L72

I guess replacing (changes.code && !changes.code.firstChange) with (changes.original && !changes.original.firstChange) would solve the issue.

Should I create a PR for this?

arthurhauer commented 1 year ago

In fact, replacing these variables does fix the issue.