We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1e896d9 commit 1c22b29Copy full SHA for 1c22b29
src/utils.ts
@@ -10,7 +10,7 @@ export function castAttributeValue(value: unknown, type?: string) {
10
const isString = typeOfValue === 'string';
11
const isNumber = typeOfValue === 'number';
12
if (type === 'boolean') {
13
- return value === 1;
+ return Boolean(value);
14
} else if (type === 'datetime' && (isString || isNumber)) {
15
return new Date(value as string | number);
16
}
0 commit comments