Skip to content

Commit a57ceae

Browse files
fix(plugins/fast-evaluation): 修复无待评教记录时报错的bug
1 parent b5e8298 commit a57ceae

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/store/actions/request.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,17 +71,16 @@ const requestTeachingAssessmentEvaluationRecords = async (
7171
pageSize: 1,
7272
flag
7373
})
74-
if (
75-
probeRes.status !== 200 ||
76-
probeRes.msg !== 'OK' ||
77-
!probeRes?.data?.records
78-
) {
74+
if (probeRes.status !== 200 || probeRes.msg !== 'OK') {
7975
throw new Error(
8076
`[教学评估查询] teachingAssessment/evaluation/queryAll 探针返回值错误: ${JSON.stringify(
8177
probeRes
8278
)}`
8379
)
8480
}
81+
if (!probeRes?.data?.records) {
82+
return []
83+
}
8584
const {
8685
data: {
8786
pageContext: { totalCount: pageSize }

0 commit comments

Comments
 (0)