Skip to content

Commit fc6a66b

Browse files
KaelWDDmitry Sharshakov
authored andcommitted
fix(VTextField): prevent TypeError when color is an empty string (#6982)
fixes #6981
1 parent 58a8725 commit fc6a66b

3 files changed

Lines changed: 7 additions & 7 deletions

File tree

β€Žpackages/vuetify/src/components/VCounter/VCounter.tsβ€Ž

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import '../../stylus/components/_counters.styl'
55
import Themeable, { functionalThemeClasses } from '../../mixins/themeable'
66

77
// Types
8-
import { VNode, RenderContext } from 'vue'
8+
import { VNode } from 'vue'
99
import mixins from '../../util/mixins'
1010

1111
/* @vue/component */
@@ -22,11 +22,11 @@ export default mixins(Themeable).extend({
2222
max: [Number, String]
2323
},
2424

25-
render (h, ctx: RenderContext): VNode {
25+
render (h, ctx): VNode {
2626
const { props } = ctx
2727
const max = parseInt(props.max, 10)
2828
const value = parseInt(props.value, 10)
29-
const content = max ? `${value} / ${max}` : props.value
29+
const content = max ? `${value} / ${max}` : String(props.value)
3030
const isGreater = max && (value > max)
3131

3232
return h('div', {

β€Žpackages/vuetify/src/components/VLabel/VLabel.tsβ€Ž

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import Colorable from '../../mixins/colorable'
66
import Themeable, { functionalThemeClasses } from '../../mixins/themeable'
77

88
// Types
9-
import { VNode, RenderContext } from 'vue'
9+
import { VNode } from 'vue'
1010
import mixins from '../../util/mixins'
1111

1212
// Helpers
@@ -21,7 +21,7 @@ export default mixins(Themeable).extend({
2121
props: {
2222
absolute: Boolean,
2323
color: {
24-
type: [Boolean, String],
24+
type: String,
2525
default: 'primary'
2626
},
2727
disabled: Boolean,
@@ -38,7 +38,7 @@ export default mixins(Themeable).extend({
3838
value: Boolean
3939
},
4040

41-
render (h, ctx: RenderContext): VNode {
41+
render (h, ctx): VNode {
4242
const { children, listeners, props } = ctx
4343
const data = {
4444
staticClass: 'v-label',

β€Žpackages/vuetify/src/components/VRadioGroup/VRadio.jsβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ export default {
104104
for: this.id
105105
},
106106
props: {
107-
color: this.radio.validationState || false,
107+
color: this.radio.validationState || '',
108108
dark: this.dark,
109109
focused: this.hasState,
110110
light: this.light

0 commit comments

Comments
Β (0)