Browse Source

fixed null-array read bug

hare8999@163.com 2 years ago
parent
commit
e620b70cee
1 changed files with 1 additions and 1 deletions
  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 => {