File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
src/components/BFormSelect Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -109,6 +109,7 @@ onActivated(handleAutofocus)
109
109
// /lifecycle events
110
110
111
111
// computed
112
+ // noinspection PointlessBooleanExpressionJS
112
113
const classes = computed (() => ({
113
114
' form-control' : props .plain ,
114
115
[` form-control-${props .size } ` ]: props .size && props .plain ,
@@ -126,14 +127,15 @@ const computedSelectSize = computed<number | undefined>(() => {
126
127
})
127
128
128
129
const computedAriaInvalid = computed <' grammar' | ' spelling' | boolean | undefined >(() => {
129
- if (props .state === false ) {
130
- return true
131
- }
132
- if (props .state === true ) {
130
+ // noinspection SuspiciousTypeOfGuard
131
+ if (typeof props .state === ' boolean' ) {
132
+ if (! props .state ) {
133
+ return true
134
+ }
133
135
return undefined
134
136
}
135
137
if (typeof props .ariaInvalid === ' boolean' ) {
136
- if (props .ariaInvalid === false ) {
138
+ if (! props .ariaInvalid ) {
137
139
return undefined
138
140
}
139
141
return props .ariaInvalid
You can’t perform that action at this time.
0 commit comments