mirror of
https://github.com/samsonjs/mit-license.git
synced 2026-04-08 11:45:52 +00:00
fix: Fix error when no user specified in hostname
Signed-off-by: Richie Bendall <richiebendall@gmail.com>
This commit is contained in:
parent
3689c60f55
commit
4f2825fcc7
1 changed files with 1 additions and 1 deletions
|
|
@ -48,7 +48,7 @@ module.exports = (req, res) => {
|
|||
gravatar = `<img id="gravatar" alt="Profile image" src="https://www.gravatar.com/avatar/${md5(
|
||||
user.email.trim().toLowerCase()
|
||||
)}" />`;
|
||||
} else if (typeof user.copyright[0] === 'object' && user.gravatar) {
|
||||
} else if (user.copyright && typeof user.copyright[0] === 'object' && user.gravatar) {
|
||||
// Supports multi-user format
|
||||
gravatar = `<img id="gravatar" alt="Profile image" src="https://www.gravatar.com/avatar/${md5(
|
||||
user.copyright[0].email.trim().toLowerCase()
|
||||
|
|
|
|||
Loading…
Reference in a new issue