Do not propagate thrown error at sendError() usage
[e-mobility-charging-stations-simulator.git] / src / charging-station / AuthorizedTagsCache.ts
index 4142ee251f354ed31100c530a5732e25e1f3c013..747b7593e422d5ef123444170a6cbc470a8333b0 100644 (file)
@@ -16,17 +16,17 @@ export default class AuthorizedTagsCache {
   }
 
   public static getInstance(): AuthorizedTagsCache {
-    if (!AuthorizedTagsCache.instance) {
+    if (AuthorizedTagsCache.instance === null) {
       AuthorizedTagsCache.instance = new AuthorizedTagsCache();
     }
     return AuthorizedTagsCache.instance;
   }
 
   public getAuthorizedTags(file: string): string[] {
-    if (!this.hasTags(file)) {
+    if (this.hasTags(file) === false) {
       this.setTags(file, this.getAuthorizedTagsFromFile(file));
       // Monitor authorization file
-      !this.FSWatchers.has(file) &&
+      this.FSWatchers.has(file) === false &&
         this.FSWatchers.set(
           file,
           FileUtils.watchJsonFile(