From fb46122cff1931e9bd6be9070ad693df34eadca4 Mon Sep 17 00:00:00 2001 From: ranqirong <274544338@qq.com> Date: Sat, 12 Oct 2024 19:14:42 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=9B=B4=E6=8E=A5=E8=B0=83=E7=94=A8disp?= =?UTF-8?q?ose=E5=87=BD=E6=95=B0=E6=B8=85=E7=A9=BA=E7=BC=96=E8=BE=91?= =?UTF-8?q?=E5=99=A8=E6=8F=92=E4=BB=B6=EF=BC=8C=E9=81=BF=E5=85=8D=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B=E5=BC=82=E5=B8=B8=E5=BC=95=E8=B5=B7=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E5=B4=A9=E6=BA=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/amis-ui/src/components/Editor.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/amis-ui/src/components/Editor.tsx b/packages/amis-ui/src/components/Editor.tsx index 03f2582c7..59c41bbeb 100644 --- a/packages/amis-ui/src/components/Editor.tsx +++ b/packages/amis-ui/src/components/Editor.tsx @@ -118,7 +118,7 @@ export class Editor extends React.Component { container: any; currentValue: any; preventTriggerChangeEvent: boolean; - disposes: Array<{dispose: () => void}> = []; + disposes: Array<() => void> = []; constructor(props: EditorProps) { super(props); @@ -176,7 +176,7 @@ export class Editor extends React.Component { const editorWillUnmount = this.props.editorWillUnmount; editorWillUnmount && editorWillUnmount(this.editor, monaco); } - this.disposes.forEach(({dispose}) => dispose()); + this.disposes.forEach(dispose => dispose()); this.disposes = []; this.editor?.dispose(); } @@ -187,7 +187,7 @@ export class Editor extends React.Component { this.loadMonaco(); } else { try { - this.disposes.forEach(({dispose}) => dispose()); + this.disposes.forEach(dispose => dispose()); this.disposes = []; if (this.editor) { this.editor.getModel().dispose();