diff options
author | hailey <me@haileyok.com> | 2025-05-17 12:19:37 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-05-17 12:19:37 -0700 |
commit | f3bc962494e55de8a4fa6805db73c081a07b47d4 (patch) | |
tree | 9b217cddc81158c14189d91984f37637149bcdec /patches | |
parent | 2fab992c04e85608e739f293300138823e643d76 (diff) | |
download | voidsky-f3bc962494e55de8a4fa6805db73c081a07b47d4.tar.zst |
temporary react-native-view-shot patch (#8383)
* temp patch * fix
Diffstat (limited to 'patches')
-rw-r--r-- | patches/react-native-view-shot+4.0.3.md | 3 | ||||
-rw-r--r-- | patches/react-native-view-shot+4.0.3.patch | 28 |
2 files changed, 31 insertions, 0 deletions
diff --git a/patches/react-native-view-shot+4.0.3.md b/patches/react-native-view-shot+4.0.3.md new file mode 100644 index 000000000..4fcb1f4c9 --- /dev/null +++ b/patches/react-native-view-shot+4.0.3.md @@ -0,0 +1,3 @@ +## react-native-view-shot patch + +Temporary patch for web, where `view`'s type has changed. diff --git a/patches/react-native-view-shot+4.0.3.patch b/patches/react-native-view-shot+4.0.3.patch new file mode 100644 index 000000000..6c13a1f2a --- /dev/null +++ b/patches/react-native-view-shot+4.0.3.patch @@ -0,0 +1,28 @@ +diff --git a/node_modules/react-native-view-shot/src/index.js b/node_modules/react-native-view-shot/src/index.js +index fa76d7e..018b686 100644 +--- a/node_modules/react-native-view-shot/src/index.js ++++ b/node_modules/react-native-view-shot/src/index.js +@@ -125,13 +125,17 @@ export function captureRef<T: React$ElementType>( + } + } + if (typeof view !== "number") { +- const node = findNodeHandle(view); +- if (!node) { +- return Promise.reject( +- new Error("findNodeHandle failed to resolve view=" + String(view)) +- ); ++ if (Platform.OS == 'web') { ++ view = view; ++ } else { ++ const node = findNodeHandle(view); ++ if (!node) { ++ return Promise.reject( ++ new Error("findNodeHandle failed to resolve view=" + String(view)) ++ ); ++ } ++ view = node; + } +- view = node; + } + const { options, errors } = validateOptions(optionsObject); + if (__DEV__ && errors.length > 0) { |