popovers: Fix toggling of user popover.

Fix the logic for closing user popover on clicking
the chevron again in the buddy list.

Fixes: #11690.
This commit is contained in:
varunvaruns9 2019-02-28 18:49:44 +05:30 committed by Tim Abbott
parent c6e60ebf0e
commit 6725d921ac
1 changed files with 1 additions and 1 deletions

View File

@ -824,7 +824,7 @@ exports.register_click_handlers = function () {
var target = $(this).closest('li'); var target = $(this).closest('li');
var user_id = target.find('a').attr('data-user-id'); var user_id = target.find('a').attr('data-user-id');
if (current_user_sidebar_user_id === user_id) { if (String(current_user_sidebar_user_id) === user_id) {
// If the popover is already shown, clicking again should toggle it. // If the popover is already shown, clicking again should toggle it.
popovers.hide_all(); popovers.hide_all();
return; return;