Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions patches/react-native/details.md
Original file line number Diff line number Diff line change
Expand Up @@ -190,3 +190,10 @@
- Upstream PR/issue: https://github.com/facebook/react-native/pull/50782
- E/App issue: https://github.com/Expensify/App/issues/64900
- PR introducing patch: [#65804](https://github.com/Expensify/App/pull/65804)

### [react-native+0.79.2+027+fix-clipboard-text-data-can-be-null.patch](react-native+0.79.2+027+fix-clipboard-text-data-can-be-null.patch)

- Reason: This patch fixes a crash that occurred when the clipboard text data can be null.
- Upstream PR/issue: 🛑
- E/App issue: [#66925](https://github.com/Expensify/App/issues/66925)
- PR introducing patch: [#66749](https://github.com/Expensify/App/pull/66749)
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
diff --git a/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactEditText.java b/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactEditText.java
index 5a05e82..095313e 100644
--- a/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactEditText.java
+++ b/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactEditText.java
@@ -370,9 +370,12 @@ public class ReactEditText extends AppCompatEditText {

if (clipData.getDescription().hasMimeType(ClipDescription.MIMETYPE_TEXT_PLAIN)) {
type = ClipDescription.MIMETYPE_TEXT_PLAIN;
- data = item.getText().toString();
- if (mPasteWatcher != null) {
- mPasteWatcher.onPaste(type, data);
+ CharSequence text = item.getText();
+ if (text != null) {
+ data = text.toString();
+ if (mPasteWatcher != null) {
+ mPasteWatcher.onPaste(type, data);
+ }
}
// Don't return - let the system proceed with default text pasting behavior
}
Loading