Skip to content

Commit 6f66c65

Browse files
committed
Oops! Fix resolveColour to recognize and properly default 'board'
1 parent 8425703 commit 6f66c65

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/renderers/_base.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4031,8 +4031,10 @@ export abstract class RendererBase {
40314031
colour = val ;
40324032
if (/^_context_/.test(colour)) {
40334033
const [,,prop] = colour.split("_");
4034-
if (prop in this.options.colourContext && this.options.colourContext[prop as "background"|"strokes"|"labels"|"annotations"|"fill"] !== undefined) {
4035-
colour = this.options.colourContext[prop as "background"|"strokes"|"labels"|"annotations"|"fill"];
4034+
if (prop in this.options.colourContext && this.options.colourContext[prop as "background"|"strokes"|"labels"|"annotations"|"fill"|"board"] !== undefined) {
4035+
colour = this.options.colourContext[prop as "background"|"strokes"|"labels"|"annotations"|"fill"|"board"];
4036+
} else if (prop === "board" && this.options.colourContext.board === undefined) {
4037+
colour = this.options.colourContext.background;
40364038
}
40374039
}
40384040
}

0 commit comments

Comments
 (0)