mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
if-else refactoring (#25025)
Summary: ## Summary ## Changelog [Internal] [Changed] - Code review ## Test Plan N/A Pull Request resolved: https://github.com/facebook/react-native/pull/25025 Differential Revision: D15502838 Pulled By: cpojer fbshipit-source-id: 9b8d2525411dea35e746638146b9af90832733f6
This commit is contained in:
committed by
Facebook Github Bot
parent
fa97b2383c
commit
b9b9137604
+1
-3
@@ -42,9 +42,7 @@ public class ClipboardModule extends ContextBaseJavaModule {
|
||||
try {
|
||||
ClipboardManager clipboard = getClipboardService();
|
||||
ClipData clipData = clipboard.getPrimaryClip();
|
||||
if (clipData == null) {
|
||||
promise.resolve("");
|
||||
} else if (clipData.getItemCount() >= 1) {
|
||||
if (clipData != null && clipData.getItemCount() >= 1) {
|
||||
ClipData.Item firstItem = clipboard.getPrimaryClip().getItemAt(0);
|
||||
promise.resolve("" + firstItem.getText());
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user