Skip to content

Commit

Permalink
fix(core): IFC file containing "$" in header fails to load (#510)
Browse files Browse the repository at this point in the history
* Fixed empty file description

* Fixed empty file description
  • Loading branch information
helenkwok authored Oct 13, 2024
1 parent 5d686f2 commit c882d13
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export class IfcMetadataReader {
webIfc.GetHeaderLine(0, WEBIFC.FILE_DESCRIPTION) || {};
if (!dataArguments) return data;
const [description, implementationLevel] = dataArguments;
if (description[0]?.value) {
if (Array.isArray(description) && description[0]?.value) {
const viewDefinition = description[0].value.match(/\[([^\]]+)\]/);
if (viewDefinition && viewDefinition[1]) {
data.viewDefinition = viewDefinition[1];
Expand Down

0 comments on commit c882d13

Please sign in to comment.