From 6c0b04fd1dd78e8689c36b3db50e164520fe2e89 Mon Sep 17 00:00:00 2001 From: Mehdi Achour Date: Thu, 10 Nov 2022 13:04:13 +0100 Subject: [PATCH 1/2] fix(remix-react): Remove nullish coalescing operator --- packages/remix-react/components.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/remix-react/components.tsx b/packages/remix-react/components.tsx index f499bcf8717..1c43538167c 100644 --- a/packages/remix-react/components.tsx +++ b/packages/remix-react/components.tsx @@ -1039,7 +1039,7 @@ export function useFormAction( method: FormMethod = "get" ): string { let { id } = useRemixRouteContext(); - let resolvedPath = useResolvedPath(action ?? "."); + let resolvedPath = useResolvedPath(action ? action : "."); // Previously we set the default action to ".". The problem with this is that // `useResolvedPath(".")` excludes search params and the hash of the resolved From 08c8848fbefc887f7f15564cd3560d16d4500d01 Mon Sep 17 00:00:00 2001 From: Mehdi Achour Date: Thu, 10 Nov 2022 13:05:55 +0100 Subject: [PATCH 2/2] add changeset --- .changeset/curvy-countries-boil.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/curvy-countries-boil.md diff --git a/.changeset/curvy-countries-boil.md b/.changeset/curvy-countries-boil.md new file mode 100644 index 00000000000..6e39d6bcc2c --- /dev/null +++ b/.changeset/curvy-countries-boil.md @@ -0,0 +1,5 @@ +--- +"@remix-run/react": patch +--- + +Fixed old browsers compatibility by removing a nullish coalescing operator