Skip to content

Commit

Permalink
use nullish coalescing operator
Browse files Browse the repository at this point in the history
  • Loading branch information
ad1992 committed Jul 8, 2024
1 parent 18278dc commit fe41f1b
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions packages/mermaid/src/diagrams/pie/pieRenderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,18 +76,18 @@ export const draw: DrawDefinition = (text, id, _version, diagObj) => {
const arcs: d3.PieArcDatum<D3Section>[] = createPieArcs(sections);

const myGeneratedColors = [
themeVariables?.pie1 || null,
themeVariables?.pie2 || null,
themeVariables?.pie3 || null,
themeVariables?.pie4 || null,
themeVariables?.pie5 || null,
themeVariables?.pie6 || null,
themeVariables?.pie7 || null,
themeVariables?.pie8 || null,
themeVariables?.pie9 || null,
themeVariables?.pie10 || null,
themeVariables?.pie11 || null,
themeVariables?.pie12 || null,
themeVariables?.pie1 ?? null,
themeVariables?.pie2 ?? null,
themeVariables?.pie3 ?? null,
themeVariables?.pie4 ?? null,
themeVariables?.pie5 ?? null,
themeVariables?.pie6 ?? null,
themeVariables?.pie7 ?? null,
themeVariables?.pie8 ?? null,
themeVariables?.pie9 ?? null,
themeVariables?.pie10 ?? null,
themeVariables?.pie11 ?? null,
themeVariables?.pie12 ?? null,
];
// Set the color scale
const color: d3.ScaleOrdinal<string, string | null, never> = scaleOrdinal(myGeneratedColors);
Expand Down

0 comments on commit fe41f1b

Please sign in to comment.