From 1b283fbe947576a44de9aeb9dccda1d8d7653c7c Mon Sep 17 00:00:00 2001 From: keyan Date: Fri, 6 Oct 2023 15:04:50 -0500 Subject: [PATCH] fix treating ref as primitive --- components/form.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/form.js b/components/form.js index 3f523d11..5406d5c8 100644 --- a/components/form.js +++ b/components/form.js @@ -596,7 +596,7 @@ export function Form ({ const toaster = useToast() const initialErrorToasted = useRef(false) useEffect(() => { - if (initialError && !initialErrorToasted) { + if (initialError && !initialErrorToasted.current) { toaster.danger(initialError.message || initialError.toString?.()) initialErrorToasted.current = true }