소스 검색

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);
       }