mirror of
https://github.com/zhigang1992/react-native-firebase.git
synced 2026-05-12 17:58:40 +08:00
[js] Run prettier for the first time
This commit is contained in:
@@ -12,8 +12,8 @@ type GoogleApiAvailabilityType = {
|
||||
isAvailable: boolean,
|
||||
isUserResolvableError?: boolean,
|
||||
hasResolution?: boolean,
|
||||
error?: string
|
||||
}
|
||||
error?: string,
|
||||
};
|
||||
|
||||
export const MODULE_NAME = 'RNFirebaseUtils';
|
||||
export const NAMESPACE = 'utils';
|
||||
@@ -36,12 +36,16 @@ export default class RNFirebaseUtils extends ModuleBase {
|
||||
const { status } = this.playServicesAvailability;
|
||||
|
||||
if (!this.playServicesAvailability.isAvailable) {
|
||||
if (INTERNALS.OPTIONS.promptOnMissingPlayServices && this.playServicesAvailability.isUserResolvableError) {
|
||||
if (
|
||||
INTERNALS.OPTIONS.promptOnMissingPlayServices &&
|
||||
this.playServicesAvailability.isUserResolvableError
|
||||
) {
|
||||
this.promptForPlayServices();
|
||||
} else {
|
||||
const error = INTERNALS.STRINGS.ERROR_PLAY_SERVICES(status);
|
||||
if (INTERNALS.OPTIONS.errorOnMissingPlayServices) {
|
||||
if (status === 2) console.warn(error); // only warn if it exists but may need an update
|
||||
if (status === 2)
|
||||
console.warn(error); // only warn if it exists but may need an update
|
||||
else throw new Error(error);
|
||||
} else {
|
||||
console.warn(error);
|
||||
@@ -80,7 +84,12 @@ export default class RNFirebaseUtils extends ModuleBase {
|
||||
* @return {RNFirebase.GoogleApiAvailabilityType|{isAvailable: boolean, status: number}}
|
||||
*/
|
||||
get playServicesAvailability(): GoogleApiAvailabilityType {
|
||||
return FirebaseCoreModule.playServicesAvailability || { isAvailable: true, status: 0 };
|
||||
return (
|
||||
FirebaseCoreModule.playServicesAvailability || {
|
||||
isAvailable: true,
|
||||
status: 0,
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -102,5 +111,4 @@ export default class RNFirebaseUtils extends ModuleBase {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
export const statics = {};
|
||||
|
||||
Reference in New Issue
Block a user