fix: initial add
This commit is contained in:
parent
b274e4f9bb
commit
208bfd9712
|
@ -37,6 +37,7 @@ const Play = () => {
|
||||||
entity.parentNode = ref.current.querySelector('.entities');
|
entity.parentNode = ref.current.querySelector('.entities');
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Object.values(room.entities).forEach(onEntityAdded);
|
||||||
room.on('entityAdded', onEntityAdded);
|
room.on('entityAdded', onEntityAdded);
|
||||||
return () => {
|
return () => {
|
||||||
room.off('entityAdded', onEntityAdded);
|
room.off('entityAdded', onEntityAdded);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user