Fixed type to always exist
This commit is contained in:
parent
42739a29cf
commit
ae7d827483
1 changed files with 1 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue