|
@@ -225,9 +225,10 @@ export default function useDraw(winId: number) {
|
|
|
|
|
|
// 获取题卡数据
|
|
|
const cardRes = await getSingleStudentCardData(studentId);
|
|
|
- const cardContent = cardRes.content
|
|
|
- ? (JSON.parse(cardRes.content) as CardContentType)
|
|
|
- : { pages: [] };
|
|
|
+ const cardContent =
|
|
|
+ cardRes && cardRes.content
|
|
|
+ ? (JSON.parse(cardRes.content) as CardContentType)
|
|
|
+ : { pages: [] };
|
|
|
cardData = cardContent.pages;
|
|
|
}
|
|
|
|