mirror of
https://github.com/cryptpad/cryptpad.git
synced 2026-09-14 11:05:41 +05:00
avoid displaying empty strings as names when removing a contact
This commit is contained in:
parent
174d97c442
commit
961e816cef
@ -590,8 +590,9 @@ define([
|
||||
if (!channel.isFriendChat) { return; }
|
||||
var curvePublic = channel.curvePublic;
|
||||
var friend = contactsData[curvePublic] || friendData;
|
||||
var name = Util.fixHTML(UI.getDisplayName(friend.name || friend.displayName));
|
||||
var content = h('div', [
|
||||
UI.setHTML(h('p'), Messages._getKey('contacts_confirmRemove', [Util.fixHTML(friend.name)])),
|
||||
UI.setHTML(h('p'), Messages._getKey('contacts_confirmRemove', [ name ])),
|
||||
]);
|
||||
UI.confirm(content, function (yes) {
|
||||
if (!yes) { return; }
|
||||
|
||||
Loading…
Reference in New Issue
Block a user