]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
Fix 4106: default boolean plugin setting for frontend
authorJohn Livingston <git@john-livingston.fr>
Tue, 18 May 2021 18:21:03 +0000 (20:21 +0200)
committerChocobozzz <me@florianbigard.com>
Tue, 25 May 2021 09:35:29 +0000 (11:35 +0200)
server/models/server/plugin.ts

index 8bb9649da88169d0fb7710328254e371dff95d36..a8de64dd4854b079d7d41d7d8a18a8807cff1975 100644 (file)
@@ -283,7 +283,7 @@ export class PluginModel extends Model<Partial<AttributesOnly<PluginModel>>> {
     for (const r of registeredSettings) {
       if (r.private !== false) continue
 
-      result[r.name] = settings[r.name] || r.default || null
+      result[r.name] = settings[r.name] ?? r.default ?? null
     }
 
     return result