Преглед на файлове

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