diff --git a/core/renderers/geras/path_object.ts b/core/renderers/geras/path_object.ts index 7d24c1e218b..07d2fcbc557 100644 --- a/core/renderers/geras/path_object.ts +++ b/core/renderers/geras/path_object.ts @@ -90,6 +90,11 @@ export class PathObject extends BasePathObject { override applyColour(block: BlockSvg) { this.svgPathLight.style.display = ''; this.svgPathDark.style.display = ''; + if (!this.style.colourTertiary) { + throw new Error( + 'The renderer did not properly initialize the tertiary colour of ' + + 'the block style'); + } this.svgPathLight.setAttribute('stroke', this.style.colourTertiary); this.svgPathDark.setAttribute('fill', this.colourDark); @@ -118,6 +123,11 @@ export class PathObject extends BasePathObject { override updateShadow_(shadow: boolean) { if (shadow) { this.svgPathLight.style.display = 'none'; + if (!this.style.colourSecondary) { + throw new Error( + 'The renderer did not properly initialize the secondary colour ' + + 'of the block style block style'); + } this.svgPathDark.setAttribute('fill', this.style.colourSecondary); this.svgPath.setAttribute('stroke', 'none'); this.svgPath.setAttribute('fill', this.style.colourSecondary);