Skip to content

Commit 78c6ff9

Browse files
committed
Update HomeInput.tsx
1 parent e7bdd2e commit 78c6ff9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/frontend_react/src/components/content/HomeInput.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,11 @@ const HomeInput: React.FC<HomeInputProps> = ({
5555
textareaRef.current.style.height = "auto";
5656
}
5757

58-
showToast("Plan created!", "success");
59-
navigate(`/plan/${response.plan_id}`);
58+
6059
console.log('Task response', response);
61-
if (response.plan_id != null) {
60+
if (response.plan_id && response.plan_id !== null) {
6261
// plan_id is valid (not null or undefined)
62+
showToast("Plan created!", "success");
6363
navigate(`/plan/${response.plan_id}`);
6464
} else {
6565
// plan_id is not valid, handle accordingly

0 commit comments

Comments
 (0)