From d3e3ddca2ca2069d4edbb87a9448114c8ca57778 Mon Sep 17 00:00:00 2001 From: Mike Hardy Date: Sun, 9 Feb 2025 13:44:06 -0500 Subject: [PATCH] fix(crashlytics): internally use modular APIs during initialization this avoids deprecation warnings from popping up despite users during their best to adopt the modular APIs --- packages/crashlytics/lib/index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/crashlytics/lib/index.js b/packages/crashlytics/lib/index.js index 51b351dcdc..73c2d668b4 100644 --- a/packages/crashlytics/lib/index.js +++ b/packages/crashlytics/lib/index.js @@ -16,12 +16,14 @@ * */ +import { getApp } from '@react-native-firebase/app'; import { isBoolean, isError, isObject, isString, isOther, + MODULAR_DEPRECATION_ARG, } from '@react-native-firebase/app/lib/common'; import { createModuleNamespace, @@ -171,5 +173,5 @@ export const firebase = getFirebaseRoot(); // This will throw with 'Default App Not initialized' if the default app is not configured. if (!isOther) { - firebase.crashlytics(); + firebase.crashlytics.call(null, getApp(), MODULAR_DEPRECATION_ARG); }