Skip to content

Commit

Permalink
Check components is defined
Browse files Browse the repository at this point in the history
  • Loading branch information
rom1504 authored Jan 11, 2025
1 parent 973f1a9 commit c0d4f91
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,10 @@ function loader (registryOrVersion) {
item.components = networkItem.components
item.removedComponents = networkItem.removeComponents
item.componentMap = new Map() // Pf146
for (const component of item.components) {
item.componentMap.set(component.type, component)
if (item.components) {
for (const component of item.components) {
item.componentMap.set(component.type, component)
}
}
return item
} else if (registry.supportFeature('itemSerializationWillOnlyUsePresent')) {
Expand Down

0 comments on commit c0d4f91

Please sign in to comment.