-
Notifications
You must be signed in to change notification settings - Fork 19
Open
Description
Currently, if a checkbox-type item does not have a valueType set, it defaults to returning the strings "true" and "false". I think we should default to returning boolean values instead. What do you think?
zotero-plugin-toolkit/src/helpers/settingsDialog.ts
Lines 456 to 464 in 0fc597f
| case "input": { | |
| const inputElement = element as HTMLInputElement; | |
| if (inputElement.type === "checkbox" || inputElement.type === "radio") { | |
| rawValue = inputElement.checked; | |
| } else { | |
| rawValue = inputElement.value; | |
| } | |
| break; | |
| } |
case "input": {
const inputElement = element as HTMLInputElement;
if (inputElement.type === "checkbox" || inputElement.type === "radio") {
--- rawValue = inputElement.checked;
+++ rawValue = Boolean(inputElement.checked);
} else {
rawValue = inputElement.value;
}
break;
}Metadata
Metadata
Assignees
Labels
No labels