File tree Expand file tree Collapse file tree 2 files changed +13
-7
lines changed
packages/crashlytics/android/src/main/java/io/capawesome/capacitorjs/plugins/firebase/crashlytics Expand file tree Collapse file tree 2 files changed +13
-7
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ ' @capacitor-firebase/crashlytics ' : patch
3
+ ---
4
+
5
+ fix(android): do not pass ` null ` to ` recordException(...) `
Original file line number Diff line number Diff line change 1
1
package io .capawesome .capacitorjs .plugins .firebase .crashlytics ;
2
2
3
+ import androidx .annotation .NonNull ;
3
4
import androidx .annotation .Nullable ;
4
5
import com .getcapacitor .JSArray ;
5
6
import com .getcapacitor .PluginCall ;
@@ -61,16 +62,16 @@ public void deleteUnsentReports() {
61
62
62
63
public void recordException (String message , JSArray stacktrace , @ Nullable JSArray keysAndValues ) {
63
64
Throwable throwable = getJavaScriptException (message , stacktrace );
64
- CustomKeysAndValues customKeysAndValues = getCustomKeysAndValues (keysAndValues );
65
- getFirebaseCrashlyticsInstance ().recordException (throwable , customKeysAndValues );
66
- }
67
-
68
- @ Nullable
69
- private CustomKeysAndValues getCustomKeysAndValues (@ Nullable JSArray keysAndValues ) {
70
65
if (keysAndValues == null ) {
71
- return null ;
66
+ getFirebaseCrashlyticsInstance ().recordException (throwable );
67
+ } else {
68
+ CustomKeysAndValues customKeysAndValues = getCustomKeysAndValues (keysAndValues );
69
+ getFirebaseCrashlyticsInstance ().recordException (throwable , customKeysAndValues );
72
70
}
71
+ }
73
72
73
+ @ NonNull
74
+ private CustomKeysAndValues getCustomKeysAndValues (@ NonNull JSArray keysAndValues ) {
74
75
CustomKeysAndValues .Builder builder = new CustomKeysAndValues .Builder ();
75
76
try {
76
77
for (int i = 0 ; i < keysAndValues .length (); i ++) {
You can’t perform that action at this time.
0 commit comments