Browse Source

remove duplicate null check

Michael Bolin 5 năm trước cách đây
mục cha
commit
d23b302d3e
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      src/index.ts

+ 1 - 1
src/index.ts

@@ -79,7 +79,7 @@ async function createRegistry(
         // file extension or else parseRawGrammar() will assume it is a PLIST
         // file extension or else parseRawGrammar() will assume it is a PLIST
         // grammar.
         // grammar.
         const match = url.match(/\/([^\/]+\.json)$/);
         const match = url.match(/\/([^\/]+\.json)$/);
-        const filePath = match && match != null ? match[1] : undefined;
+        const filePath = match != null ? match[1] : undefined;
         return parseRawGrammar(content, filePath);
         return parseRawGrammar(content, filePath);
       }
       }