[js][firestore] added `enableLogging(boolean)` method

This commit is contained in:
Salakar 2017-11-28 07:41:55 +00:00
parent 11e5bc2ae7
commit 54e904e22f
1 changed files with 7 additions and 0 deletions

View File

@ -2,6 +2,8 @@
* @flow * @flow
* Firestore representation wrapper * Firestore representation wrapper
*/ */
import { NativeModules } from 'react-native';
import ModuleBase from './../../utils/ModuleBase'; import ModuleBase from './../../utils/ModuleBase';
import CollectionReference from './CollectionReference'; import CollectionReference from './CollectionReference';
import DocumentReference from './DocumentReference'; import DocumentReference from './DocumentReference';
@ -141,4 +143,9 @@ export default class Firestore extends ModuleBase {
export const statics = { export const statics = {
FieldValue, FieldValue,
GeoPoint, GeoPoint,
enableLogging(bool) {
if (NativeModules[Firestore._NATIVE_MODULE]) {
NativeModules[Firestore._NATIVE_MODULE].enableLogging(bool);
}
},
}; };