Skip to content

Commit

Permalink
fix(VAlert): update derived icon logic
Browse files Browse the repository at this point in the history
  • Loading branch information
johnleider committed Apr 24, 2019
1 parent c6f3a2c commit fa409fb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/vuetify/src/components/VAlert/VAlert.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ export default mixins(
dense: Boolean,
dismissible: Boolean,
icon: {
default: '',
type: [Boolean, String],
validator (val: boolean | string) {
return typeof val === 'string' || val === false
Expand Down Expand Up @@ -147,8 +148,8 @@ export default mixins(
return this.color || this.type
},
computedIcon (): string | boolean {
if (!this.icon) return false
if (this.icon != null) return this.icon
if (this.icon === false) return false
if (typeof this.icon === 'string' && this.icon) return this.icon

switch (this.type) {
case 'info': return '$vuetify.icons.info'
Expand Down

0 comments on commit fa409fb

Please sign in to comment.