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

Commit 1d10870

Browse files
committed
fix(image-list): Fix prop validator functions
1 parent b826193 commit 1d10870

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

components/image-list/ImageList.vue

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,11 @@ export default {
1111
props: {
1212
standardColumn: {
1313
type: Number,
14-
validator: (value) => value >= 1 && value <= 12,
15-
default: 0
14+
validator: (value) => value >= 1 && value <= 12
1615
},
1716
masonryColumn: {
1817
type: Number,
19-
validator: (value) => value >= 1 && value <= 12,
20-
default: 0
18+
validator: (value) => value >= 1 && value <= 12
2119
},
2220
textProtection: {
2321
type: Boolean,
@@ -27,12 +25,12 @@ export default {
2725
computed: {
2826
classes () {
2927
let standard = {}
30-
if (this.standardColumn > 0 && this.masonryColumn === 0) {
28+
if (this.standardColumn > 0 && typeof this.masonryColumn === 'null') {
3129
standard['image-list-standard-' + this.standardColumn] = true
3230
}
3331
3432
let masonry = {}
35-
if (this.masonryColumn > 0 && this.standardColumn === 0) {
33+
if (this.masonryColumn > 0 && typeof this.standardColumn === 'null') {
3634
masonry['image-list-masonry-' + this.masonryColumn] = true
3735
masonry['mdc-image-list--masonry'] = true
3836
}

0 commit comments

Comments
 (0)