Skip to content

Commit 5b822fb

Browse files
author
edencoder
committed
fix trueish
1 parent a9fd296 commit 5b822fb

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

bundles/form/fields/boolean.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,6 @@ export default class BooleanField extends Field {
5757
*/
5858
async submit({ req, old }, field, value) {
5959
// return database value
60-
return value === true || value === 'true';
60+
return value === true || (typeof value === 'string' && value.toLowerCase() === 'true');
6161
}
6262
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
<field-select-display>
2-
<field-display multiple={ true } { ...props } />
2+
<field-display multiple={ true } { ...props } default={ true } />
33
</field-select-display>

0 commit comments

Comments
 (0)