Fix empty key bug in parameters panel (#1842)
Co-authored-by: Muhammed Salih Altun <muhammedsalihaltun@gmail.com>
This commit is contained in:
@@ -278,6 +278,14 @@ function WorkflowParameterAddPanel({ type, onClose, onSave }: Props) {
|
|||||||
<div className="flex justify-end">
|
<div className="flex justify-end">
|
||||||
<Button
|
<Button
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
|
if (!key) {
|
||||||
|
toast({
|
||||||
|
variant: "destructive",
|
||||||
|
title: "Failed to add parameter",
|
||||||
|
description: "Key is required",
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (type === "workflow") {
|
if (type === "workflow") {
|
||||||
if (
|
if (
|
||||||
parameterType === "json" &&
|
parameterType === "json" &&
|
||||||
|
|||||||
@@ -329,6 +329,14 @@ function WorkflowParameterEditPanel({
|
|||||||
<div className="flex justify-end">
|
<div className="flex justify-end">
|
||||||
<Button
|
<Button
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
|
if (!key) {
|
||||||
|
toast({
|
||||||
|
variant: "destructive",
|
||||||
|
title: "Failed to save parameter",
|
||||||
|
description: "Key is required",
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (type === "workflow") {
|
if (type === "workflow") {
|
||||||
if (
|
if (
|
||||||
parameterType === "json" &&
|
parameterType === "json" &&
|
||||||
|
|||||||
Reference in New Issue
Block a user