aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models
diff options
context:
space:
mode:
Diffstat (limited to 'server/models')
-rw-r--r--server/models/server/plugin.ts9
1 files changed, 9 insertions, 0 deletions
diff --git a/server/models/server/plugin.ts b/server/models/server/plugin.ts
index 50963ba57..f39b97ef0 100644
--- a/server/models/server/plugin.ts
+++ b/server/models/server/plugin.ts
@@ -156,6 +156,15 @@ export class PluginModel extends Model<PluginModel> {
156 return PluginModel.findOne(query) 156 return PluginModel.findOne(query)
157 .then((c: any) => { 157 .then((c: any) => {
158 if (!c) return undefined 158 if (!c) return undefined
159 const value = c.value
160
161 if (typeof value === 'string' && value.startsWith('{')) {
162 try {
163 return JSON.parse(value)
164 } catch {
165 return value
166 }
167 }
159 168
160 return c.value 169 return c.value
161 }) 170 })