fix treating ref as primitive
This commit is contained in:
parent
8ca8bb985e
commit
1b283fbe94
|
@ -596,7 +596,7 @@ export function Form ({
|
||||||
const toaster = useToast()
|
const toaster = useToast()
|
||||||
const initialErrorToasted = useRef(false)
|
const initialErrorToasted = useRef(false)
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (initialError && !initialErrorToasted) {
|
if (initialError && !initialErrorToasted.current) {
|
||||||
toaster.danger(initialError.message || initialError.toString?.())
|
toaster.danger(initialError.message || initialError.toString?.())
|
||||||
initialErrorToasted.current = true
|
initialErrorToasted.current = true
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue