diff --git a/packages/amis-ui/src/components/DiffEditor.tsx b/packages/amis-ui/src/components/DiffEditor.tsx index c5c221d05e3..676e06828d3 100644 --- a/packages/amis-ui/src/components/DiffEditor.tsx +++ b/packages/amis-ui/src/components/DiffEditor.tsx @@ -69,7 +69,7 @@ export default class DiffEditor extends React.Component { handleModifiedEditorChange(e: any) { const {onChange} = this.props; const value = this.modifiedEditor.getModel().getValue(); - onChange?.(value, e); + value !== this.props.value && onChange?.(value, e); } @autobind