Fix empty key bug in parameters panel (#1842)

Co-authored-by: Muhammed Salih Altun <muhammedsalihaltun@gmail.com>
This commit is contained in:
Shuchang Zheng 2025-02-26 09:33:19 -08:00 committed by GitHub
parent 9b9c84f7dc
commit 52648b37e2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 16 additions and 0 deletions

View file

@ -278,6 +278,14 @@ function WorkflowParameterAddPanel({ type, onClose, onSave }: Props) {
<div className="flex justify-end">
<Button
onClick={() => {
if (!key) {
toast({
variant: "destructive",
title: "Failed to add parameter",
description: "Key is required",
});
return;
}
if (type === "workflow") {
if (
parameterType === "json" &&

View file

@ -329,6 +329,14 @@ function WorkflowParameterEditPanel({
<div className="flex justify-end">
<Button
onClick={() => {
if (!key) {
toast({
variant: "destructive",
title: "Failed to save parameter",
description: "Key is required",
});
return;
}
if (type === "workflow") {
if (
parameterType === "json" &&