From dee9e6a3901dc9dc29c32c643ea465507c84e4df Mon Sep 17 00:00:00 2001 From: psychobunny Date: Fri, 6 Nov 2020 14:20:12 -0500 Subject: [PATCH] fix: unhandled error --- public/persona.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/public/persona.js b/public/persona.js index c7551e3..6fba6ad 100644 --- a/public/persona.js +++ b/public/persona.js @@ -1,6 +1,6 @@ "use strict"; -/*globals ajaxify, config, utils, app, socket*/ +/*globals ajaxify, config, utils, app, socket, window, document, $*/ $(document).ready(function () { setupNProgress(); @@ -367,6 +367,10 @@ $(document).ready(function () { } socket.emit('user.isFollowing', { uid: data.uid }, function (err, isFollowing) { + if (err) { + return err; + } + app.parseAndTranslate('modules/usercard', data, function (html) { var card = $(html); avatar.parents('a').after(card.hide());