Skip to content

Commit

Permalink
fix wrong map image param
Browse files Browse the repository at this point in the history
  • Loading branch information
Mihai Varga committed Feb 10, 2020
1 parent 71432b9 commit 7e12fdd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/videoshow.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Videoshow.prototype.loop = function (seconds) {
}

Videoshow.prototype.image = function (image) {
this.images.push(mapImages(images))
this.images.push(mapImages(image))
return this
}

Expand Down Expand Up @@ -104,10 +104,10 @@ function mapImages(obj) {
if (Array.isArray(obj)) {
return obj.map(mapImages)
}

if (obj && typeof obj === 'object') {
return obj
}

throw new TypeError('image must be a string or an array')
}

0 comments on commit 7e12fdd

Please sign in to comment.