浏览代码

remove duplicate null check

Michael Bolin 5 年之前
父节点
当前提交
d23b302d3e
共有 1 个文件被更改,包括 1 次插入1 次删除
  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
         // grammar.
         const match = url.match(/\/([^\/]+\.json)$/);
-        const filePath = match && match != null ? match[1] : undefined;
+        const filePath = match != null ? match[1] : undefined;
         return parseRawGrammar(content, filePath);
       }