Fix typing error

This commit is contained in:
Pieter Vander Vennet 2022-12-23 16:51:31 +01:00
parent 4140d1e19a
commit ca1480a268

View file

@ -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")
}