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() {
|
function handleSaveVariable() {
|
||||||
let data: { name: string; value: string; type?: string } = {
|
let data: { name: string; value: string; type?: string } = {
|
||||||
name: key,
|
name: key,
|
||||||
|
type,
|
||||||
value,
|
value,
|
||||||
};
|
};
|
||||||
if (type) data = { ...data, type };
|
|
||||||
registerGlobalVariable(data)
|
registerGlobalVariable(data)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
const { name, id, type } = res.data;
|
const { name, id, type } = res.data;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue