From 54e904e22faa82745cd346c88881eff3100954c5 Mon Sep 17 00:00:00 2001 From: Salakar Date: Tue, 28 Nov 2017 07:41:55 +0000 Subject: [PATCH] [js][firestore] added `enableLogging(boolean)` method --- lib/modules/firestore/index.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/modules/firestore/index.js b/lib/modules/firestore/index.js index b1270c97..f18b6f75 100644 --- a/lib/modules/firestore/index.js +++ b/lib/modules/firestore/index.js @@ -2,6 +2,8 @@ * @flow * Firestore representation wrapper */ +import { NativeModules } from 'react-native'; + import ModuleBase from './../../utils/ModuleBase'; import CollectionReference from './CollectionReference'; import DocumentReference from './DocumentReference'; @@ -141,4 +143,9 @@ export default class Firestore extends ModuleBase { export const statics = { FieldValue, GeoPoint, + enableLogging(bool) { + if (NativeModules[Firestore._NATIVE_MODULE]) { + NativeModules[Firestore._NATIVE_MODULE].enableLogging(bool); + } + }, };