Skip to content
This repository has been archived by the owner on Nov 30, 2020. It is now read-only.

Commit

Permalink
fix(image-list): Fix prop validator functions
Browse files Browse the repository at this point in the history
  • Loading branch information
matsp committed Mar 27, 2018
1 parent b826193 commit 1d10870
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions components/image-list/ImageList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,11 @@ export default {
props: {
standardColumn: {
type: Number,
validator: (value) => value >= 1 && value <= 12,
default: 0
validator: (value) => value >= 1 && value <= 12
},
masonryColumn: {
type: Number,
validator: (value) => value >= 1 && value <= 12,
default: 0
validator: (value) => value >= 1 && value <= 12
},
textProtection: {
type: Boolean,
Expand All @@ -27,12 +25,12 @@ export default {
computed: {
classes () {
let standard = {}
if (this.standardColumn > 0 && this.masonryColumn === 0) {
if (this.standardColumn > 0 && typeof this.masonryColumn === 'null') {
standard['image-list-standard-' + this.standardColumn] = true
}
let masonry = {}
if (this.masonryColumn > 0 && this.standardColumn === 0) {
if (this.masonryColumn > 0 && typeof this.standardColumn === 'null') {
masonry['image-list-masonry-' + this.masonryColumn] = true
masonry['mdc-image-list--masonry'] = true
}
Expand Down

0 comments on commit 1d10870

Please sign in to comment.