Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

fix: handling null valueList (#435)

Liu Ji43169f2e1722
diff --git a/frontend/src/store/modules/label.ts b/frontend/src/store/modules/label.ts
index 3f7e248733..4b6f31b67a 100644
--- a/frontend/src/store/modules/label.ts
+++ b/frontend/src/store/modules/label.ts
@@ -5,6 +5,7 @@ import {
LabelState,
LabelId,
LabelPatch,
+ LabelValueType,
} from "../../types";
function convert(
@@ -12,8 +13,10 @@ function convert(
includedList: ResourceObject[],
rootGetters: any
): Label {
+ const valueList = (label.attributes.valueList || []) as LabelValueType[];
return {
- ...(label.attributes as Omit<Label, "id">),
+ ...(label.attributes as Omit<Label, "valueList" | "id">),
+ valueList,
id: parseInt(label.id, 10),
};
}