fix(rn,polyfills) fix Performance polyfill

We need to re-override now() to avoid a recursion error. Also I missed the
default export.
This commit is contained in:
Saúl Ibarra Corretgé 2021-09-09 16:00:34 +02:00 committed by Saúl Ibarra Corretgé
parent d21eb59f24
commit 3bf1a1774f
1 changed files with 2 additions and 1 deletions

View File

@ -399,7 +399,8 @@ function _visitNode(node, callback) {
const perf = require('react-native-performance'); const perf = require('react-native-performance');
global.performance = perf; global.performance = perf.default;
global.performance.now = now;
global.PerformanceObserver = perf.PerformanceObserver; global.PerformanceObserver = perf.PerformanceObserver;
// CallStats // CallStats