Skip to content

Commit

Permalink
fix(VTextField): prevent TypeError when color is an empty string (#6982)
Browse files Browse the repository at this point in the history
fixes #6981
  • Loading branch information
KaelWD authored and Dmitry Sharshakov committed Apr 13, 2019
1 parent 58a8725 commit fc6a66b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions packages/vuetify/src/components/VCounter/VCounter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import '../../stylus/components/_counters.styl'
import Themeable, { functionalThemeClasses } from '../../mixins/themeable'

// Types
import { VNode, RenderContext } from 'vue'
import { VNode } from 'vue'
import mixins from '../../util/mixins'

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

render (h, ctx: RenderContext): VNode {
render (h, ctx): VNode {
const { props } = ctx
const max = parseInt(props.max, 10)
const value = parseInt(props.value, 10)
const content = max ? `${value} / ${max}` : props.value
const content = max ? `${value} / ${max}` : String(props.value)
const isGreater = max && (value > max)

return h('div', {
Expand Down
6 changes: 3 additions & 3 deletions packages/vuetify/src/components/VLabel/VLabel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import Colorable from '../../mixins/colorable'
import Themeable, { functionalThemeClasses } from '../../mixins/themeable'

// Types
import { VNode, RenderContext } from 'vue'
import { VNode } from 'vue'
import mixins from '../../util/mixins'

// Helpers
Expand All @@ -21,7 +21,7 @@ export default mixins(Themeable).extend({
props: {
absolute: Boolean,
color: {
type: [Boolean, String],
type: String,
default: 'primary'
},
disabled: Boolean,
Expand All @@ -38,7 +38,7 @@ export default mixins(Themeable).extend({
value: Boolean
},

render (h, ctx: RenderContext): VNode {
render (h, ctx): VNode {
const { children, listeners, props } = ctx
const data = {
staticClass: 'v-label',
Expand Down
2 changes: 1 addition & 1 deletion packages/vuetify/src/components/VRadioGroup/VRadio.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ export default {
for: this.id
},
props: {
color: this.radio.validationState || false,
color: this.radio.validationState || '',
dark: this.dark,
focused: this.hasState,
light: this.light
Expand Down

0 comments on commit fc6a66b

Please sign in to comment.