Michael Wang 3 anos atrás
pai
commit
c4b75513dc

+ 15 - 1
src/features/projectCompareDetail/ScoreRateCompare.vue

@@ -336,7 +336,21 @@ function rangeSegementsLine() {
 
 const hasRangeSegementsComparison = $computed(() => {
   const r = courses
-    .filter((c) => c.rangeConfig ?? { rangeConfig: Math.random() })
+    .map((c) => {
+      if (!c.rangeConfig) {
+        return {
+          rangeConfig: [
+            {
+              type: "ZERO",
+              baseScore: Math.random(),
+              adjustScore: Math.random(),
+            },
+          ] as RangeConfig[],
+        };
+      } else {
+        return c;
+      }
+    })
     .map((c) => JSON.stringify(c.rangeConfig));
 
   const s = new Set(r);