mixed missing key entry for settings.get

This commit is contained in:
Andris Reinman 2021-09-05 14:51:10 +03:00
parent 64c47ec587
commit 549655394a
2 changed files with 2 additions and 2 deletions

View file

@ -154,7 +154,7 @@ class SettingsHandler {
return JSON.parse(row.value);
}
let keyInfo = this.keys.find(k => k.key === row.key) || {};
let keyInfo = (row && this.keys.find(k => k.key === row.key)) || {};
let defaultValue = 'default' in options ? options.default : keyInfo.constKey ? consts[keyInfo.constKey] : undefined;
return row ? row.value : defaultValue;

View file

@ -1,6 +1,6 @@
{
"name": "wildduck",
"version": "1.35.1",
"version": "1.35.2",
"description": "IMAP/POP3 server built with Node.js and MongoDB",
"main": "server.js",
"scripts": {