Skip to content

Commit 231402a

Browse files
authored
gltf-plugin: null check for subclasses of PropertySetAccessor (#1047)
* gltf-plugin: null check for subclasses of PropertySetAccessor Not all of the properties of a class in schema will appear in it‘s instances. * gltf-plugin: update for PropertyXXAccessor.js
1 parent a38e01a commit 231402a

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/plugins/three/gltf/metadata/classes/PropertyAttributeAccessor.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class PropertyAttributeClassProperty extends ClassProperty {
88

99
super( enums, classProperty, attributeProperty );
1010

11-
this.attribute = attributeProperty.attribute;
11+
this.attribute = attributeProperty?.attribute ?? null;
1212

1313
}
1414

src/plugins/three/gltf/metadata/classes/PropertyTableAccessor.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class PropertyTableClassProperty extends ClassProperty {
1515

1616
super( enums, classProperty, tableProperty );
1717

18-
this.values = tableProperty.values;
18+
this.values = tableProperty?.values ?? null;
1919
this.valueLength = typeToComponentCount( this.type );
2020
this.arrayOffsets = getField( tableProperty, 'arrayOffsets', null );
2121
this.stringOffsets = getField( tableProperty, 'stringOffsets', null );

0 commit comments

Comments
 (0)