Fix comparison between CustomError and string

This commit is contained in:
Timon Engelke 2021-11-12 22:58:49 +01:00 committed by webzwo0i
parent 6d773f7d56
commit b0a7237443

View file

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