Skip to content

Commit

Permalink
fix: Allow materials to be null on GraphicsComponent
Browse files Browse the repository at this point in the history
  • Loading branch information
eonarheim committed Dec 26, 2023
1 parent 5c28d4e commit a77658c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion src/engine/Graphics/GraphicsComponent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down

0 comments on commit a77658c

Please sign in to comment.