fix: guard
This commit is contained in:
parent
d647002ac3
commit
048cc91fbf
|
@ -112,6 +112,9 @@ export default class Spawner extends decorate(Trait) {
|
|||
}
|
||||
|
||||
static optionsForSpawn(entity) {
|
||||
if (!entity) {
|
||||
return undefined;
|
||||
}
|
||||
return Object.keys(entity.traitInstance('spawner').params.spawns)
|
||||
.reduce((r, key) => ({...r, [key]: key}), {});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user