Skip to content

Commit 2448ecf

Browse files
cardosowjhsf
andauthored
chore: use is.literal
Co-authored-by: Will Harney <62956339+wjhsf@users.noreply.github.com>
1 parent 65b1e0b commit 2448ecf

File tree

1 file changed

+1
-1
lines changed
  • packages/@lwc/ssr-compiler/src/compile-js/decorators/api

1 file changed

+1
-1
lines changed

packages/@lwc/ssr-compiler/src/compile-js/decorators/api/validate.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ function validateName(definition: ApiDefinition) {
6363
}
6464

6565
function validatePropertyValue(property: ApiPropertyDefinition) {
66-
if (property.value && property.value.type === 'Literal' && property.value.value === true) {
66+
if (is.literal(property.value) && property.value.value === true) {
6767
throw generateError(property, DecoratorErrors.INVALID_BOOLEAN_PUBLIC_PROPERTY);
6868
}
6969
}

0 commit comments

Comments
 (0)