From aec00886e20151ac552568978fba1dfd55136ea1 Mon Sep 17 00:00:00 2001 From: Janka Uryga Date: Tue, 30 Jul 2024 01:54:26 +0200 Subject: [PATCH] fix: validation message for scroll/replace --- packages/next/src/client/form.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/next/src/client/form.tsx b/packages/next/src/client/form.tsx index 7f257e88c65f6..9ad3776c66a32 100644 --- a/packages/next/src/client/form.tsx +++ b/packages/next/src/client/form.tsx @@ -93,7 +93,7 @@ export default function Form({ if (!isNavigatingForm) { if (process.env.NODE_ENV === 'development') { - if (replace || scroll) { + if (replace !== undefined || scroll !== undefined) { console.error( 'Passing `replace` or `scroll` to a
whose `action` is a function has no effect.\n' + 'See the relevant docs to learn how to control this behavior for navigations triggered from actions:\n' +