diff --git a/src/components/ConfigPanel.tsx b/src/components/ConfigPanel.tsx
index 1002bcc..b30fc13 100644
--- a/src/components/ConfigPanel.tsx
+++ b/src/components/ConfigPanel.tsx
@@ -148,7 +148,7 @@ export function ConfigPanel({ node, onClose, onUpdateNode }: ConfigPanelProps) {
value: string,
arrayName: string
) => {
- const array = [...(node.data[arrayName] || [])];
+ const array = [...node.data[arrayName]];
array[index] = { ...array[index], [field]: value };
const newData = {
...node.data,
@@ -163,7 +163,7 @@ export function ConfigPanel({ node, onClose, onUpdateNode }: ConfigPanelProps) {
const fieldToAdd = arrayName === "queryFields" ? newQueryField : newField;
if (!fieldToAdd.name.trim()) return;
- const array = [...(node.data[arrayName] || []), { ...fieldToAdd }];
+ const array = [...node.data[arrayName], { ...fieldToAdd }];
const newData = {
...node.data,
[arrayName]: array,
@@ -181,7 +181,7 @@ export function ConfigPanel({ node, onClose, onUpdateNode }: ConfigPanelProps) {
};
const removeField = (index: number, arrayName: string) => {
- const array = [...(node.data[arrayName] || [])];
+ const array = [...node.data[arrayName]];
array.splice(index, 1);
const newData = {
...node.data,
@@ -212,7 +212,7 @@ export function ConfigPanel({ node, onClose, onUpdateNode }: ConfigPanelProps) {