@@ -1961,7 +1961,7 @@ module.exports = app => {
const auditors = await this.ctx.service.stageAudit.getAuditors(stageId, i);
const group = this.ctx.helper.groupAuditors(auditors);
const historyGroup = [];
- const max_order = group[group.length - 1][0].audit_order;
+ const max_order = group.length > 0 && group[group.length - 1].length > 0 ? group[group.length - 1][0].audit_order : -1;
for (const g of group) {
const his = {
beginYear: '', beginDate: '', beginTime: '', endYear: '', endDate: '', endTime: '',