Fix .trim() on null in conformance cases getter and add fallback returns

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-09 14:10:08 +08:00
parent 19a39bbbff
commit 4dbed9fe56

View File

@@ -182,7 +182,7 @@ export const useConformanceStore = defineStore("conformanceStore", {
? abbreviateNumber(new Decimal(v.toFixed(2)))
: null,
);
copy.value = copy.value.map((v) => v.trim()).join(", ");
copy.value = copy.value.map((v) => (v ?? "").trim()).join(", ");
break;
default:
break;
@@ -218,6 +218,7 @@ export const useConformanceStore = defineStore("conformanceStore", {
};
});
}
return [];
},
loopTraces: (state) => {
return state.allLoopTraces;
@@ -256,6 +257,7 @@ export const useConformanceStore = defineStore("conformanceStore", {
};
});
}
return [];
},
},
actions: {