From 0700508dd28986ab37bf798912a9f8264012907f Mon Sep 17 00:00:00 2001 From: ppoffice Date: Wed, 30 Oct 2019 13:25:21 -0400 Subject: [PATCH] fix(widget): ignore empty profile avatar --- layout/widget/profile.ejs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/layout/widget/profile.ejs b/layout/widget/profile.ejs index bfb0b3e..70055ae 100644 --- a/layout/widget/profile.ejs +++ b/layout/widget/profile.ejs @@ -1,10 +1,10 @@ <% function avatar() { const avatar = get_config_from_obj(widget, 'avatar'); const gravatar_email = get_config_from_obj(widget, 'gravatar'); - if (gravatar_email !== null) { + if (gravatar_email) { return gravatar(gravatar_email, 128); } - if (avatar !== null) { + if (avatar) { return url_for(avatar) } return url_for('images/avatar.png');