Skip to content

Commit

Permalink
Fix incoming boolean formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
guerler committed Nov 18, 2024
1 parent 8c3f7d8 commit d680811
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
3 changes: 3 additions & 0 deletions src/utilities/parsePlugin.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import type { InputAtomicType, InputElementType, InputValuesType, PluginConfigType, PluginType } from "@/types";
import { toBoolean } from "./toBoolean";

interface ParsedPlugin {
plugin: PluginType;
Expand All @@ -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;
}
Expand Down

0 comments on commit d680811

Please sign in to comment.