Просмотр исходного кода

fix: 评测报告页面进不去问题修复

TIANYONG 1 год назад
Родитель
Сommit
0ce0d98443
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      src/page-instrument/view-evaluat-report/index.tsx

+ 1 - 1
src/page-instrument/view-evaluat-report/index.tsx

@@ -157,7 +157,7 @@ export default defineComponent({
 		const setPathColor = () => {
 			for (const note of detailData.musicalNotesPlayStats) {
 				const active = state.times[note.musicalNotesIndex];
-				const svgEl = document.getElementById("vf-" + active.id);
+				const svgEl = active?.id ? document.getElementById("vf-" + active?.id) : null;
 				svgEl?.classList.add(colorsClass[note.musicalErrorType]);
 			}
 		};