From ca1480a268c33a53f3811fbe28c465760b2c47ef Mon Sep 17 00:00:00 2001 From: Pieter Vander Vennet Date: Fri, 23 Dec 2022 16:51:31 +0100 Subject: [PATCH] Fix typing error --- Models/ThemeConfig/LineRenderingConfig.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Models/ThemeConfig/LineRenderingConfig.ts b/Models/ThemeConfig/LineRenderingConfig.ts index 652be51e2..f40c0e788 100644 --- a/Models/ThemeConfig/LineRenderingConfig.ts +++ b/Models/ThemeConfig/LineRenderingConfig.ts @@ -22,8 +22,11 @@ export default class LineRenderingConfig extends WithContextLoader { this.fill = this.tr("fill", undefined) this.fillColor = this.tr("fillColor", undefined) - this.leftRightSensitive = - json.offset !== undefined && json.offset !== 0 && json.offset !== "0" + if (typeof json.offset === "string") { + json.offset = parseFloat(json.offset) + } + + this.leftRightSensitive = json.offset !== undefined && json.offset !== 0 this.offset = this.tr("offset", "0") }