Skip to content

Commit

Permalink
fix(core): add guard when reading ifc organization
Browse files Browse the repository at this point in the history
  • Loading branch information
agviegas committed Oct 17, 2024
1 parent fd4304f commit 55494b5
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@thatopen/components",
"description": "Collection of core functionalities to author BIM apps.",
"version": "2.3.8",
"version": "2.3.9",
"author": "That Open Company",
"contributors": [
"Antonio Gonzalez Viegas (https://github.com/agviegas)",
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/core/Components/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export class Components implements Disposable {
/**
* The version of the @thatopen/components library.
*/
static readonly release = "2.3.8";
static readonly release = "2.3.9";

/** {@link Disposable.onDisposed} */
readonly onDisposed = new Event<void>();
Expand Down
14 changes: 10 additions & 4 deletions packages/core/src/fragments/IfcLoader/src/ifc-metadata-reader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,18 @@ export class IfcMetadataReader {
if (authorName?.value) data.author.name = authorName.value;
if (authorEmail?.value) data.author.email = authorEmail.value;
}
if (organization[0]?.value) data.organization = organization[0].value;
if (preprocessorVersion?.value)
if (organization && organization[0]?.value) {
data.organization = organization[0].value;
}
if (preprocessorVersion?.value) {
data.preprocessorVersion = preprocessorVersion?.value;
if (originatingSystem?.value)
}
if (originatingSystem?.value) {
data.originatingSystem = originatingSystem?.value;
if (authorization?.value) data.authorization = authorization?.value;
}
if (authorization?.value) {
data.authorization = authorization?.value;
}
return data;
}

Expand Down

0 comments on commit 55494b5

Please sign in to comment.