Skip to content

Commit

Permalink
fix(remix-react): Remove nullish coalescing operator (#4561)
Browse files Browse the repository at this point in the history
  • Loading branch information
machour authored and kentcdodds committed Dec 15, 2022
1 parent 863604f commit 4145fc8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/curvy-countries-boil.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@remix-run/react": patch
---

Fixed old browsers compatibility by removing a nullish coalescing operator
2 changes: 1 addition & 1 deletion packages/remix-react/components.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4145fc8

Please sign in to comment.