Skip to content

Commit 9856ca7

Browse files
DRoetdsseng
authored andcommitted
fix(VSwitch/VCheckbox): color not applied if value is 0/false (#9431)
1 parent b7848d8 commit 9856ca7

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/vuetify/src/components/VCheckbox/VCheckbox.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ export default Selectable.extend({
6060
if (this.disabled && !this.inputIndeterminate) return undefined
6161
if (this.hasError && this.shouldValidate) return 'error'
6262
if (this.hasSuccess) return 'success'
63-
if (this.hasColor) return this.computedColor
63+
if (this.hasColor !== null) return this.computedColor
6464
return undefined
6565
},
6666
},

packages/vuetify/src/components/VSwitch/VSwitch.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ export default Selectable.extend({
5959
validationState (): string | undefined {
6060
if (this.hasError && this.shouldValidate) return 'error'
6161
if (this.hasSuccess) return 'success'
62-
if (this.hasColor) return this.computedColor
62+
if (this.hasColor !== null) return this.computedColor
6363
return undefined
6464
},
6565
switchData (): VNodeData {

0 commit comments

Comments
 (0)