Explorar o código

bad conditional statement

shinoka7 %!s(int64=6) %!d(string=hai) anos
pai
achega
b2a35791d1
Modificáronse 1 ficheiros con 1 adicións e 4 borrados
  1. 1 4
      src/server/service/acl.js

+ 1 - 4
src/server/service/acl.js

@@ -18,10 +18,7 @@ class AclService {
 
   getIsPublicWikiOnly() {
     const publicWikiOnly = process.env.PUBLIC_WIKI_ONLY;
-    if (publicWikiOnly === 'true' || publicWikiOnly === 1) {
-      return true;
-    }
-    return false;
+    return !!publicWikiOnly;
   }
 
   getIsGuestAllowedToRead() {