diff --git a/packages/camera/src/RoomCameraWidgetManager.ts b/packages/camera/src/RoomCameraWidgetManager.ts index 59d39160..08d70fb4 100644 --- a/packages/camera/src/RoomCameraWidgetManager.ts +++ b/packages/camera/src/RoomCameraWidgetManager.ts @@ -69,9 +69,18 @@ export class RoomCameraWidgetManager implements IRoomCameraWidgetManager filter.matrix = effect.colorMatrix; filter.alpha = selectedEffect.alpha; - if(!Array.isArray(sprite.filters)) sprite.filters = []; - - sprite.filters.push(filter); + if(sprite.filters === undefined || sprite.filters === null) + { + sprite.filters = [filter]; + } + else if(Array.isArray(sprite.filters)) + { + sprite.filters = [...sprite.filters, filter]; + } + else + { + sprite.filters = [sprite.filters, filter]; + } } else {