Implement singleton design pattern with strict null check
[e-mobility-charging-stations-simulator.git] / src / charging-station / AuthorizedTagsCache.ts
index 4142ee251f354ed31100c530a5732e25e1f3c013..d39fbee61e6fa6e27a13fbddbab25dbdffee2d06 100644 (file)
@@ -16,7 +16,7 @@ export default class AuthorizedTagsCache {
   }
 
   public static getInstance(): AuthorizedTagsCache {
-    if (!AuthorizedTagsCache.instance) {
+    if (AuthorizedTagsCache.instance === null) {
       AuthorizedTagsCache.instance = new AuthorizedTagsCache();
     }
     return AuthorizedTagsCache.instance;