Skip to content

Commit a1ff7a8

Browse files
committed
fix: Prevent body undefined error
1 parent e568cbf commit a1ff7a8

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

console/atest-ui/src/views/TestCase.vue

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,10 @@ function RunHistoryTestCase(historyCaseID : string){
113113
parameters.value = []
114114
requestLoading.value = false
115115
UIAPI.ErrorTip(e)
116-
testResult.value.bodyObject = JSON.parse(e.body)
117-
testResult.value.originBodyObject = JSON.parse(e.body)
116+
if (e.body !== undefined && e.body !== null){
117+
testResult.value.bodyObject = JSON.parse(e.body)
118+
testResult.value.originBodyObject = JSON.parse(e.body)
119+
}
118120
})
119121
}
120122

0 commit comments

Comments
 (0)