We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 02e06ed commit d7a72ecCopy full SHA for d7a72ec
1 file changed
packages/document-picker/android/src/main/java/com/reactnativedocumentpicker/RNDocumentPickerModule.kt
@@ -103,11 +103,7 @@ class RNDocumentPickerModule(reactContext: ReactApplicationContext) :
103
}
104
105
override fun saveDocument(options: ReadableMap, promise: Promise) {
106
- val currentActivity = currentActivity
107
- if (currentActivity == null) {
108
- rejectWithNullActivity(promise)
109
- return
110
- }
+ val currentActivity = reactApplicationContext.currentActivity ?: return rejectWithNullActivity(promise)
111
if (!promiseWrapper.trySetPromiseRejectingIncoming(promise, "saveDocuments")) {
112
return
113
0 commit comments