cube-ui icon indicating copy to clipboard operation
cube-ui copied to clipboard

window.performance.timing.navigationStart有bug

Open 303182519 opened this issue 5 years ago • 1 comments

Version

1.12.36

Reproduction link

https://aq.huya.com/m/third_bind/third_bind.html

Steps to reproduce

发现你们的库里面用到window.performance.timing.navigationStart这个方法,在sentry的监控下,发现在IOS报null is not an object (evaluating 'window.performance.timing.navigationStart')

What is expected?

未知

What is actually happening?

未知

Dependencies Version

vue: 2.6.11 better-scroll: 1.15.0

303182519 avatar Feb 18 '20 08:02 303182519

这个貌似是 bs 的bug 目前来看的话 只能先 hack 处理掉 As https://github.com/ustbhuangyi/better-scroll/issues/841

if (!performance.timing) {
  performance.timing = {}
  Object.defineProperty(performance.timing, 'navigationStart', {
    get: function () {
      return Date.now() - performance.now()
    }
  })
}

dolymood avatar Feb 18 '20 14:02 dolymood