From 5bb4423309ddfd3a161c3ec2472e79067125553e Mon Sep 17 00:00:00 2001 From: Cheng-Han, Wu Date: Mon, 16 May 2016 13:54:00 +0800 Subject: Fix to handle if last change user profile photo is null --- public/js/extra.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'public') diff --git a/public/js/extra.js b/public/js/extra.js index fd9fba6b..79364d11 100644 --- a/public/js/extra.js +++ b/public/js/extra.js @@ -30,7 +30,8 @@ function updateLastChangeUser() { if (lastchangeuser && lastchangeuserprofile) { var icon = lastchangeui.user.children('i'); icon.attr('title', lastchangeuserprofile.name).tooltip('fixTitle'); - icon.attr('style', 'background-image:url(' + lastchangeuserprofile.photo + ')'); + if (lastchangeuserprofile.photo) + icon.attr('style', 'background-image:url(' + lastchangeuserprofile.photo + ')'); lastchangeui.user.show(); lastchangeui.nouser.hide(); } else { -- cgit v1.2.3