mirror of
https://github.com/samsonjs/mit-license.git
synced 2026-03-25 09:25:49 +00:00
fix: Properly map over user.copyright
This commit is contained in:
parent
8ff508a547
commit
7f6a8d5dd9
1 changed files with 3 additions and 3 deletions
|
|
@ -36,10 +36,10 @@ module.exports = (req, res) => {
|
|||
if (user.copyright) {
|
||||
if (_.isString(user.copyright)) {
|
||||
name = getCopyrightHTML(user, options.format !== 'html');
|
||||
} else if (user.copyright.every(val => _.isString(val))) {
|
||||
} else if (_.isArray(user.copyright) && user.copyright.every(val => _.isString(val))) {
|
||||
// Supports: ['Remy Sharp', 'Richie Bendall']
|
||||
name = user
|
||||
.map(_ => (options.format !== 'html' ? _ : escapeTags(_)))
|
||||
name = user.copyright
|
||||
.map(v => (options.format !== 'html' ? v : escapeTags(v)))
|
||||
.join(', ');
|
||||
} else {
|
||||
name = user.copyright.map(getCopyrightHTML).join(', ');
|
||||
|
|
|
|||
Loading…
Reference in a new issue