Merge pull request #4181 from thelounge/maxleiter/fixQueryModes

Fix client crash when opening a user context menu in query
This commit is contained in:
Max Leiter 2021-03-30 22:49:55 -07:00 committed by GitHub
commit 500034ff5d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -245,8 +245,8 @@ export function generateUserContextMenu($root, channel, network, user) {
},
];
// Bail because we don't have a special mode.
if (currentChannelUser.modes.length < 1) {
// Bail because we're in a query or we don't have a special mode.
if (!currentChannelUser.modes || currentChannelUser.modes.length < 1) {
return items;
}