【问题标题】:React-native core.js Promise polyfill does not seem to report unhandledRejection of PromisesReact-native core.js Promise polyfill 似乎没有报告 unhandledRejection of Promises
【发布时间】:2015-11-15 19:44:34
【问题描述】:

我似乎无法追踪 React-Native (0.13.2) 不报告 ES6 未处理的承诺拒绝的原因,如 core js docs 中所述

更具体地说,当使用 Chrome 进行调试并打开控制台时,Promise.reject() 不会产生 console.error()

有什么想法吗?

另外 - 我不确定为什么 react-native pollyfilling Promise 而它应该在 JavascriptCore 以及 Chrome + Webkit 执行器上可用。

【问题讨论】:

    标签: ecmascript-6 react-native


    【解决方案1】:

    react-native 使用的是this Promises 库而不是 core.js Promises。 该库不支持报告未处理的异常

    Polyfilling 的原因,至少目前与core-js 和 Chrome 都和这个V8 bug 有关

    【讨论】:

    猜你喜欢
    • 2020-01-26
    • 1970-01-01
    • 2016-12-20
    • 2020-10-12
    • 2020-03-21
    • 1970-01-01
    • 1970-01-01
    • 2016-04-13
    • 1970-01-01
    相关资源
    最近更新 更多