Skip to content

Commit c882d13

Browse files
authored
fix(core): IFC file containing "$" in header fails to load (#510)
* Fixed empty file description * Fixed empty file description
1 parent 5d686f2 commit c882d13

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/core/src/fragments/IfcLoader/src/ifc-metadata-reader.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export class IfcMetadataReader {
4040
webIfc.GetHeaderLine(0, WEBIFC.FILE_DESCRIPTION) || {};
4141
if (!dataArguments) return data;
4242
const [description, implementationLevel] = dataArguments;
43-
if (description[0]?.value) {
43+
if (Array.isArray(description) && description[0]?.value) {
4444
const viewDefinition = description[0].value.match(/\[([^\]]+)\]/);
4545
if (viewDefinition && viewDefinition[1]) {
4646
data.viewDefinition = viewDefinition[1];

0 commit comments

Comments
 (0)