From 692a7471c1f22d2642fe329287c773a59b91b640 Mon Sep 17 00:00:00 2001 From: Reda Al Sulais Date: Wed, 15 Nov 2023 12:46:58 +0300 Subject: [PATCH] chore: apply review changes --- packages/mermaid/src/diagrams/pie/pieParser.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/packages/mermaid/src/diagrams/pie/pieParser.ts b/packages/mermaid/src/diagrams/pie/pieParser.ts index ac978a5a9..2acae4f1c 100644 --- a/packages/mermaid/src/diagrams/pie/pieParser.ts +++ b/packages/mermaid/src/diagrams/pie/pieParser.ts @@ -1,4 +1,4 @@ -import type { Pie, PieSection } from 'mermaid-parser'; +import type { Pie } from 'mermaid-parser'; import { parse } from 'mermaid-parser'; import { log } from '../../logger.js'; @@ -10,9 +10,7 @@ import { db } from './pieDb.js'; function populateDb(ast: Pie, db: PieDB) { populateCommonDb(ast, db); db.setShowData(ast.showData); - ast.sections.map((section: PieSection) => { - db.addSection(section); - }); + ast.sections.map(db.addSection); } export const parser: ParserDefinition = {