浏览代码

fixed null-array read bug

hare8999@163.com 2 年之前
父节点
当前提交
e620b70cee
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/views/elective/report/components/major-introduce-batch.vue

+ 1 - 1
src/views/elective/report/components/major-introduce-batch.vue

@@ -28,7 +28,7 @@ export default {
   },
   computed: {
     majors() {
-      const all = this.getOptionalMajors()
+      const all = this.getOptionalMajors() || []
       if (!all.length) return []
       const distinctMajors = {}
       all.forEach(item => {