Fix comparison between CustomError and string

pull/5273/head
Timon Engelke 2021-11-12 22:58:49 +01:00 committed by webzwo0i
parent 6d773f7d56
commit b0a7237443
1 changed files with 1 additions and 1 deletions

View File

@ -255,7 +255,7 @@ const listSessionsWithDBKey = async (dbkey) => {
const sessionInfo = await exports.getSessionInfo(sessionID);
sessions[sessionID] = sessionInfo;
} catch (err) {
if (err === 'apierror: sessionID does not exist') {
if (err.name === 'apierror') {
console.warn(`Found bad session ${sessionID} in ${dbkey}`);
sessions[sessionID] = null;
} else {