From d6808116af2bdce2f530f2fb5ac2502766e72816 Mon Sep 17 00:00:00 2001 From: guerler Date: Mon, 18 Nov 2024 14:32:51 +0300 Subject: [PATCH] Fix incoming boolean formatting --- package.json | 2 +- src/utilities/parsePlugin.ts | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 96b4ccd..df8944f 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "charts" ], "license": "MIT", - "version": "0.0.30", + "version": "0.0.31", "type": "module", "main": "./dist/galaxy-charts.umd.cjs", "module": "./dist/galaxy-charts.js", diff --git a/src/utilities/parsePlugin.ts b/src/utilities/parsePlugin.ts index 6c3f171..48037c8 100644 --- a/src/utilities/parsePlugin.ts +++ b/src/utilities/parsePlugin.ts @@ -1,4 +1,5 @@ import type { InputAtomicType, InputElementType, InputValuesType, PluginConfigType, PluginType } from "@/types"; +import { toBoolean } from "./toBoolean"; interface ParsedPlugin { plugin: PluginType; @@ -23,6 +24,8 @@ function formatValue(input: InputElementType, inputValue: InputAtomicType): Inpu let value = inputValue ?? input.value; if (input.type === "float") { value = Number(value); + } else if (input.type === "boolean") { + value = toBoolean(value); } return value; }