Преглед на файлове

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 години
родител
ревизия
3bf1a1774f
променени са 1 файла, в които са добавени 2 реда и са изтрити 1 реда
  1. 2
    1
      react/features/mobile/polyfills/browser.js

+ 2
- 1
react/features/mobile/polyfills/browser.js Целия файл

@@ -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…
Отказ
Запис