Skip to content

Commit

Permalink
EXTRA DiagramConverter.ts prevent extra init and mark member as readonly
Browse files Browse the repository at this point in the history
  • Loading branch information
tbouffard committed Dec 11, 2024
1 parent 915a8d9 commit 4f51a03
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/component/parser/json/converter/DiagramConverter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export default class DiagramConverter {
private readonly parsingMessageCollector: ParsingMessageCollector,
) {}

private convertedFonts = new Map<string, Font>();
private readonly convertedFonts = new Map<string, Font>();

deserialize(bpmnDiagrams: BPMNDiagram[] | BPMNDiagram): BpmnModel {
const flowNodes: Shape[] = [];
Expand All @@ -66,8 +66,6 @@ export default class DiagramConverter {
}

private deserializeFonts(bpmnLabelStyle: BPMNLabelStyle[] | BPMNLabelStyle): void {
this.convertedFonts = new Map();

for (const labelStyle of ensureIsArray(bpmnLabelStyle))
for (const font of ensureIsArray(labelStyle.Font))
this.convertedFonts.set(labelStyle.id, new Font(font.name, font.size, font.isBold, font.isItalic, font.isUnderline, font.isStrikeThrough));
Expand Down

0 comments on commit 4f51a03

Please sign in to comment.