|
@@ -41,7 +41,7 @@ export const fetchTemplatesThunk = createAsyncThunk(
|
|
|
async (params: ReportTemplateQueryParams | undefined, { rejectWithValue }) => {
|
|
async (params: ReportTemplateQueryParams | undefined, { rejectWithValue }) => {
|
|
|
try {
|
|
try {
|
|
|
const response = await getReportTemplateList(params);
|
|
const response = await getReportTemplateList(params);
|
|
|
- return response.data.templates;
|
|
|
|
|
|
|
+ return response.data.templates || [];
|
|
|
} catch (error: any) {
|
|
} catch (error: any) {
|
|
|
return rejectWithValue(error.message || '获取诊断报告模板列表失败');
|
|
return rejectWithValue(error.message || '获取诊断报告模板列表失败');
|
|
|
}
|
|
}
|