Selaa lähdekoodia

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 vuotta sitten
vanhempi
commit
3bf1a1774f
1 muutettua tiedostoa jossa 2 lisäystä ja 1 poistoa
  1. 2
    1
      react/features/mobile/polyfills/browser.js

+ 2
- 1
react/features/mobile/polyfills/browser.js Näytä tiedosto

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

Loading…
Peruuta
Tallenna