我在 IE 11 上收到“‘Promise’未定义”错误,而 Chrome 和 Firefox 则不会出现此错误。
我正在使用以下 OIDC 客户端包,我也已经向该作者提交了问题。 https://github.com/IdentityModel/oidc-client-js/issues/826
如果我点击链接 SCRIPT5009,我会被定向到 https://learn.microsoft.com/en-us/scripting/javascript/misc/undefined-identifier
我安装了以下两个,问题仍然存在 https://www.npmjs.com/package/babel-polyfill https://www.npmjs.com/package/promise-polyfill
此外,我在 StackOverflow 和网络上阅读了一些文章,这些文章 promise 错误来自于使用箭头函数和 ES6 代码,但此问题出现在 OIDC 包中,因此应用程序中的任何代码都不会给出此错误。
最佳答案
尝试安装es6-promise polyfill,您可以引用这个帖子:Getting Error Promise is undefined in IE11 .
关于javascript - React OIDC-Client IE Promise 未定义,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55852393/