Skip to content

Commit

Permalink
fix: default parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
Kikobeats committed May 25, 2021
1 parent f2021d6 commit d5d788a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/node.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module.exports = require('./factory')({
VERSION: require('../package.json').version
})

module.exports.render = (input, { width = '650px' }) => {
module.exports.render = (input, { width = '650px' } = {}) => {
if (input.url && input.type) return `<img width="${width}" src="${input.url}" />`
return input
}

0 comments on commit d5d788a

Please sign in to comment.