error Unexpected use of comma operator no-sequences解决过程

error Unexpected use of comma operator no-sequences解决过程

报错内容:

ERROR in ./pages/course/_id.vue friendly-errors 12:59:17

Module Error (from ./node_modules/eslint-loader/index.js): friendly-errors 12:59:17

E:javaJavaWorkSpaceOnlineEducationWebReviewvue-front-1010pagescourse_id.vue
188:60 error Unexpected use of comma operator no-sequences

✖ 1 problem (1 error, 0 warnings)

报错界面:

解决办法:

可以看出报错地方是_id.vue文件的188行,报错提示是不期望无序列使用逗号运算符,代码更改如下:

    initCourseInfo() {
      courseApi.getCourseInfo(this.courseId)
        .then(response => {
          this.courseWebVo = response.data.data.courseWebVo
          this.chapterVideoList = response.data.data.chapterVideoList
          this.isbuy = response.data.data.isBuy
        })
    },

错误位置:

原文地址:https://www.cnblogs.com/Courage129/p/14047375.html