Browse Source

fix(rn,polyfills) fix Performance polyfill

We need to re-override now() to avoid a recursion error. Also I missed the
default export.
master
Saúl Ibarra Corretgé 4 years ago
parent
commit
3bf1a1774f
1 changed files with 2 additions and 1 deletions
  1. 2
    1
      react/features/mobile/polyfills/browser.js

+ 2
- 1
react/features/mobile/polyfills/browser.js View File

399
 
399
 
400
     const perf = require('react-native-performance');
400
     const perf = require('react-native-performance');
401
 
401
 
402
-    global.performance = perf;
402
+    global.performance = perf.default;
403
+    global.performance.now = now;
403
     global.PerformanceObserver = perf.PerformanceObserver;
404
     global.PerformanceObserver = perf.PerformanceObserver;
404
 
405
 
405
     // CallStats
406
     // CallStats

Loading…
Cancel
Save