Parcourir la source

elective master - detail student query error fixed

hare8999@163.com il y a 2 ans
Parent
commit
7b2e56342e
1 fichiers modifiés avec 1 ajouts et 0 suppressions
  1. 1 0
      src/views/elective/generation/detail.vue

+ 1 - 0
src/views/elective/generation/detail.vue

@@ -213,6 +213,7 @@ export default {
         this.detailWrapper = res.data
 
         const studentIds = res.data.details?.map(d => d['studentId']).toString()
+        if (!studentIds) return Promise.resolve({ data: {} })
         return getGenerationOptionalMajorsBatch({ studentIds })
       }).then(res => {
         this.majorsMap = res.data