Przeglądaj źródła

bad conditional statement

shinoka7 6 lat temu
rodzic
commit
b2a35791d1
1 zmienionych plików z 1 dodań i 4 usunięć
  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() {