Explorar o código

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

TIANYONG hai 1 ano
pai
achega
0ce0d98443
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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 = () => {
 		const setPathColor = () => {
 			for (const note of detailData.musicalNotesPlayStats) {
 			for (const note of detailData.musicalNotesPlayStats) {
 				const active = state.times[note.musicalNotesIndex];
 				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]);
 				svgEl?.classList.add(colorsClass[note.musicalErrorType]);
 			}
 			}
 		};
 		};