From b1b6e9b8de7771e61486fa381999a1e074ba4de9 Mon Sep 17 00:00:00 2001 From: pietervdvn Date: Thu, 22 Sep 2022 16:54:15 +0200 Subject: [PATCH] Fix if no translation is given --- Utils/svgToPdf.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Utils/svgToPdf.ts b/Utils/svgToPdf.ts index d7f793b18..c03b49982 100644 --- a/Utils/svgToPdf.ts +++ b/Utils/svgToPdf.ts @@ -30,7 +30,7 @@ class SvgToPdfInternals { this.doc = advancedApi; this._images = images; this._rects = rects; - this.extractTranslation = s => extractTranslation(s).replace(/ /g, " "); + this.extractTranslation = s => extractTranslation(s)?.replace(/ /g, " "); this.currentMatrix = this.doc.unitMatrix; this.currentMatrixInverted = this.doc.unitMatrix; }