mirror of
https://github.com/zhigang1992/react-native-firebase.git
synced 2026-04-27 19:25:20 +08:00
[js][all] added nativeSDKMissing check for all modules - part of making all module native sdk's optional.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
// @flow
|
||||
import { NativeModules } from 'react-native';
|
||||
import { Base } from './../base';
|
||||
import { nativeSDKMissing } from './../../utils';
|
||||
|
||||
const FirebaseAnalytics = NativeModules.RNFirebaseAnalytics;
|
||||
const AlphaNumericUnderscore = /^[a-zA-Z0-9_]+$/;
|
||||
@@ -21,7 +21,13 @@ const ReservedEventNames = [
|
||||
'user_engagement',
|
||||
];
|
||||
|
||||
export default class Analytics extends Base {
|
||||
export default class Analytics {
|
||||
constructor() {
|
||||
if (FirebaseAnalytics.nativeSDKMissing) {
|
||||
return nativeSDKMissing('analytics');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Logs an app event.
|
||||
* @param {string} name
|
||||
|
||||
Reference in New Issue
Block a user