diff --git a/src/frontend/src/components/addNewVariableButtonComponent/addNewVariableButton.tsx b/src/frontend/src/components/addNewVariableButtonComponent/addNewVariableButton.tsx index 310115d90..71fd1ad07 100644 --- a/src/frontend/src/components/addNewVariableButtonComponent/addNewVariableButton.tsx +++ b/src/frontend/src/components/addNewVariableButtonComponent/addNewVariableButton.tsx @@ -25,9 +25,9 @@ export default function AddNewVariableButton({ children }): JSX.Element { function handleSaveVariable() { let data: { name: string; value: string; type?: string } = { name: key, + type, value, }; - if (type) data = { ...data, type }; registerGlobalVariable(data) .then((res) => { const { name, id, type } = res.data;