about summary refs log tree commit diff
path: root/patches/@react-navigation+native+6.1.7.patch
diff options
context:
space:
mode:
authorMinseo Lee <itoupluk427@gmail.com>2024-02-24 18:23:03 +0900
committerGitHub <noreply@github.com>2024-02-24 18:23:03 +0900
commit89c65c856e4d88cd455d6fb0352755b2dc0b1b66 (patch)
treea0ff2b2d694f3d54c9c11a8f62bdd5737509691f /patches/@react-navigation+native+6.1.7.patch
parentc2d87b807554f11cb99694d4b0ccb86905d468c0 (diff)
parentd38f168de593b0a7883180ee51bf043eb1557dd2 (diff)
downloadvoidsky-89c65c856e4d88cd455d6fb0352755b2dc0b1b66.tar.zst
Merge branch 'bluesky-social:main' into patch-3
Diffstat (limited to 'patches/@react-navigation+native+6.1.7.patch')
-rw-r--r--patches/@react-navigation+native+6.1.7.patch56
1 files changed, 56 insertions, 0 deletions
diff --git a/patches/@react-navigation+native+6.1.7.patch b/patches/@react-navigation+native+6.1.7.patch
new file mode 100644
index 000000000..b604e2c1a
--- /dev/null
+++ b/patches/@react-navigation+native+6.1.7.patch
@@ -0,0 +1,56 @@
+diff --git a/node_modules/@react-navigation/native/lib/commonjs/useLinking.js b/node_modules/@react-navigation/native/lib/commonjs/useLinking.js
+index ef4f368..2b0da35 100644
+--- a/node_modules/@react-navigation/native/lib/commonjs/useLinking.js
++++ b/node_modules/@react-navigation/native/lib/commonjs/useLinking.js
+@@ -273,8 +273,12 @@ function useLinking(ref, _ref) {
+           });
+           const currentIndex = history.index;
+           try {
+-            if (nextIndex !== -1 && nextIndex < currentIndex) {
+-              // An existing entry for this path exists and it's less than current index, go back to that
++            if (
++              nextIndex !== -1 &&
++              nextIndex < currentIndex &&
++              // We should only go back if the entry exists and it's less than current index
++              history.get(nextIndex - currentIndex)
++            ) {              // An existing entry for this path exists and it's less than current index, go back to that
+               await history.go(nextIndex - currentIndex);
+             } else {
+               // We couldn't find an existing entry to go back to, so we'll go back by the delta
+diff --git a/node_modules/@react-navigation/native/lib/module/useLinking.js b/node_modules/@react-navigation/native/lib/module/useLinking.js
+index 62a3b43..11a5a28 100644
+--- a/node_modules/@react-navigation/native/lib/module/useLinking.js
++++ b/node_modules/@react-navigation/native/lib/module/useLinking.js
+@@ -264,8 +264,12 @@ export default function useLinking(ref, _ref) {
+           });
+           const currentIndex = history.index;
+           try {
+-            if (nextIndex !== -1 && nextIndex < currentIndex) {
+-              // An existing entry for this path exists and it's less than current index, go back to that
++            if (
++              nextIndex !== -1 &&
++              nextIndex < currentIndex &&
++              // We should only go back if the entry exists and it's less than current index
++              history.get(nextIndex - currentIndex)
++            ) {              // An existing entry for this path exists and it's less than current index, go back to that
+               await history.go(nextIndex - currentIndex);
+             } else {
+               // We couldn't find an existing entry to go back to, so we'll go back by the delta
+diff --git a/node_modules/@react-navigation/native/src/useLinking.tsx b/node_modules/@react-navigation/native/src/useLinking.tsx
+index 3db40b7..9ba4ecd 100644
+--- a/node_modules/@react-navigation/native/src/useLinking.tsx
++++ b/node_modules/@react-navigation/native/src/useLinking.tsx
+@@ -381,7 +381,12 @@ export default function useLinking(
+           const currentIndex = history.index;
+ 
+           try {
+-            if (nextIndex !== -1 && nextIndex < currentIndex) {
++            if (
++              nextIndex !== -1 &&
++              nextIndex < currentIndex &&
++              // We should only go back if the entry exists and it's less than current index
++              history.get(nextIndex - currentIndex)
++            ) {
+               // An existing entry for this path exists and it's less than current index, go back to that
+               await history.go(nextIndex - currentIndex);
+             } else {