Created
November 10, 2022 15:27
-
-
Save machour/870705998b8e14a96171ee2fb85d5921 to your computer and use it in GitHub Desktop.
Remove nullish coalescing operator from @remix-run/react
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/node_modules/@remix-run/react/dist/components.js b/node_modules/@remix-run/react/dist/components.js | |
index f947287..e7cc1f5 100644 | |
--- a/node_modules/@remix-run/react/dist/components.js | |
+++ b/node_modules/@remix-run/react/dist/components.js | |
@@ -773,7 +773,7 @@ method = "get") { | |
let { | |
id | |
} = useRemixRouteContext(); | |
- let resolvedPath = reactRouterDom.useResolvedPath(action ?? "."); // Previously we set the default action to ".". The problem with this is that | |
+ let resolvedPath = reactRouterDom.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 | |
// URL. This is the intended behavior of when "." is specifically provided as | |
// the form action, but inconsistent w/ browsers when the action is omitted. | |
diff --git a/node_modules/@remix-run/react/dist/esm/components.js b/node_modules/@remix-run/react/dist/esm/components.js | |
index e884e7b..d23d86b 100644 | |
--- a/node_modules/@remix-run/react/dist/esm/components.js | |
+++ b/node_modules/@remix-run/react/dist/esm/components.js | |
@@ -749,7 +749,7 @@ method = "get") { | |
let { | |
id | |
} = useRemixRouteContext(); | |
- let resolvedPath = useResolvedPath(action ?? "."); // Previously we set the default action to ".". The problem with this is that | |
+ 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 | |
// URL. This is the intended behavior of when "." is specifically provided as | |
// the form action, but inconsistent w/ browsers when the action is omitted. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment