diff --git a/CHANGELOG.md b/CHANGELOG.md index dd6c75134..e3b39d8d8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,7 +20,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). ### Fixed -- +- Fixed TS type on `GraphicsComponent` and allow `.material` to be null to unset, current workaround is using `.material = null as any` ### Updates diff --git a/src/engine/Graphics/GraphicsComponent.ts b/src/engine/Graphics/GraphicsComponent.ts index 037c3ee81..c9b27a216 100644 --- a/src/engine/Graphics/GraphicsComponent.ts +++ b/src/engine/Graphics/GraphicsComponent.ts @@ -264,7 +264,7 @@ export class GraphicsComponent extends Component<'ex.graphics'> { public layers: GraphicsLayers; - public material: Material; + public material: Material | null = null; public getGraphic(name: string): Graphic | undefined { return this._graphics[name];