From 9fc5625bf5e170dca7f7740a7b75e8b8f018fa76 Mon Sep 17 00:00:00 2001 From: Marc Glasser Date: Fri, 29 Jul 2022 10:14:40 -1000 Subject: [PATCH 1/2] Stop bad destructure from crashing Android --- src/libs/Firebase/index.native.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/libs/Firebase/index.native.js b/src/libs/Firebase/index.native.js index adebd4c80ca0..ce9951b8b91d 100644 --- a/src/libs/Firebase/index.native.js +++ b/src/libs/Firebase/index.native.js @@ -1,5 +1,6 @@ /* eslint-disable no-unused-vars */ import perf from '@react-native-firebase/perf'; +import lodashGet from 'lodash/get'; import * as Environment from '../Environment/Environment'; import Log from '../Log'; @@ -37,7 +38,7 @@ function stopTrace(customEventName) { return; } - const {trace, start} = traceMap[customEventName]; + const trace = lodashGet(traceMap, [customEventName, 'trace']); if (!trace) { return; } @@ -45,6 +46,7 @@ function stopTrace(customEventName) { trace.stop(); // Uncomment to inspect logs on release builds + // const start = lodashGet(traceMap, [customEventName, 'start']); // Log.info(`sidebar_loaded: ${stop - start} ms`, true); delete traceMap[customEventName]; From bf6ce1c8ce464ced3e525e5d86d0fdf27635bd39 Mon Sep 17 00:00:00 2001 From: Marc Glasser Date: Fri, 29 Jul 2022 10:14:55 -1000 Subject: [PATCH 2/2] remove line --- src/libs/Firebase/index.native.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/libs/Firebase/index.native.js b/src/libs/Firebase/index.native.js index ce9951b8b91d..49df7a999f7b 100644 --- a/src/libs/Firebase/index.native.js +++ b/src/libs/Firebase/index.native.js @@ -33,7 +33,6 @@ function startTrace(customEventName) { */ function stopTrace(customEventName) { const stop = global.performance.now(); - if (Environment.isDevelopment()) { return; }