Skip to content

Commit 12e1e86

Browse files
authored
Merge pull request #867 from EBISPOT/fix-stato-issue
Fix failing class expression
2 parents ce9276f + 03c4fc1 commit 12e1e86

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

frontend/src/app/util.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import Property from "../model/Property";
77
export function asArray<T>(obj: T | T[]): T[] {
88
if (Array.isArray(obj)) {
99
return obj;
10-
} else if (obj) {
10+
} else if (obj !== undefined && obj !== null) {
1111
return [obj];
1212
}
1313
return [];

frontend/src/components/ClassExpression.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,10 @@ export default function ClassExpression({
303303
);
304304
}
305305

306-
const hasValue = asArray(expr["http://www.w3.org/2002/07/owl#hasValue"])[0];
306+
let hasValue = asArray(expr["http://www.w3.org/2002/07/owl#hasValue"])[0];
307+
if (typeof hasValue === "number") {
308+
hasValue = hasValue.toString();
309+
}
307310
if (hasValue) {
308311
return (
309312
<span>

0 commit comments

Comments
 (0)