美文网首页
react content.js:787 Uncaught (i

react content.js:787 Uncaught (i

作者: wodeph | 来源:发表于2023-11-05 18:07 被阅读0次

使用了promise,但是在使用的过程中报Uncaught (in promise)错误,第一次遇到这种错误,所以在此记录下,方便以后解决问题

const promise = new Promise(function (resolve) {

   resolve()

  })

改成

            const promise = new Promise(function (resolve) {

                resolve()

            }).catch((e) => {});

相关文章

网友评论

      本文标题:react content.js:787 Uncaught (i

      本文链接:https://www.haomeiwen.com/subject/lhttwdtx.html