瀏覽代碼

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…
取消
儲存