美文网首页
Expected the Promise reject ion

Expected the Promise reject ion

作者: 前端的爬行之旅 | 来源:发表于2018-10-15 14:11 被阅读144次

项目报错:
Expected the Promise rejection reason to be an Error

http://eslint.org/docs/rules/prefer-promise-reject-errors  Expected the Promise reject
ion reason to be an Error
  src\store\modules\user.js:68:13
              reject('error')


将 reject('error')
改为: reject(new Erro('error'))

相关文章

网友评论

      本文标题:Expected the Promise reject ion

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