aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models
diff options
context:
space:
mode:
Diffstat (limited to 'server/models')
-rw-r--r--server/models/server/plugin.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/server/models/server/plugin.ts b/server/models/server/plugin.ts
index 3f88ac26d..c72846343 100644
--- a/server/models/server/plugin.ts
+++ b/server/models/server/plugin.ts
@@ -123,7 +123,7 @@ export class PluginModel extends Model<PluginModel> {
123 123
124 return PluginModel.findOne(query) 124 return PluginModel.findOne(query)
125 .then(p => { 125 .then(p => {
126 if (!p || p.settings === undefined) { 126 if (!p || !p.settings || p.settings === undefined) {
127 const registered = registeredSettings.find(s => s.name === settingName) 127 const registered = registeredSettings.find(s => s.name === settingName)
128 if (!registered || registered.default === undefined) return undefined 128 if (!registered || registered.default === undefined) return undefined
129 129
@@ -153,7 +153,7 @@ export class PluginModel extends Model<PluginModel> {
153 const result: { [settingName: string ]: string | boolean } = {} 153 const result: { [settingName: string ]: string | boolean } = {}
154 154
155 for (const name of settingNames) { 155 for (const name of settingNames) {
156 if (!p || p.settings[name] === undefined) { 156 if (!p || !p.settings || p.settings[name] === undefined) {
157 const registered = registeredSettings.find(s => s.name === name) 157 const registered = registeredSettings.find(s => s.name === name)
158 158
159 if (registered?.default !== undefined) { 159 if (registered?.default !== undefined) {