From 4c173108ffc74974864ff8dbb845f5d4c24caed4 Mon Sep 17 00:00:00 2001 From: suntgr Date: Sat, 15 Feb 2025 15:48:43 +0800 Subject: [PATCH] fix: rolling back the changes directly --- src/js/index.js | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/js/index.js b/src/js/index.js index 04016b3..538bb68 100644 --- a/src/js/index.js +++ b/src/js/index.js @@ -205,8 +205,14 @@ class ReactJsonView extends React.PureComponent { } updateSrc = () => { - const { name, namespace, newValue, existingValue, updatedSrc, type } = - ObjectAttributes.get(this.rjvId, 'action', 'variable-update') + const { + name, + namespace, + new_value: newValue, + existing_value: existingValue, + updated_src: updatedSrc, + type + } = ObjectAttributes.get(this.rjvId, 'action', 'variable-update') const { onEdit, onDelete, onAdd } = this.props const { src } = this.state @@ -214,12 +220,12 @@ class ReactJsonView extends React.PureComponent { let result const onEditPayload = { - existingSrc: src, - newValue, - updatedSrc, + existing_src: src, + new_value: newValue, + updated_src: updatedSrc, name, namespace, - existingValue + existing_value: existingValue } switch (type) {