NateTheGreatt / bitECS

Flexible, minimal, data-oriented ECS library for Typescript
Mozilla Public License 2.0
944 stars 84 forks source link

Prevent error when using hasComponent on an unregistered component #18

Closed juliangarnier closed 3 years ago

juliangarnier commented 3 years ago

This PR makes it safe to call hasComponent on unregistered components and prevent getting the TypeError Cannot destructure property 'generationId' of 'world[$componentMap].get(...)' as it is undefined..

NateTheGreatt commented 3 years ago

🙏 thanks julian!