We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 49e3ee8 + 3f7041f commit 039fa5aCopy full SHA for 039fa5a
packages/core/src/openbim/IDSSpecifications/src/importers/parameter.ts
@@ -23,8 +23,15 @@ export const getParameterValue = (
23
if ("enumeration" in restriction) {
24
result.type = "enumeration";
25
const enumeration = restriction.enumeration.map(
26
- ({ value }: { value: string }) =>
27
- parseNumericString ? value : String(value),
+ ({ value }: { value: string }) => {
+ if (restriction.base.includes("string")) return String(value);
28
+ if (
29
+ restriction.base.includes("integer") ||
30
+ restriction.base.includes("double")
31
+ )
32
+ return Number(value);
33
+ return value;
34
+ },
35
);
36
result.parameter = enumeration;
37
}
0 commit comments