Sfoglia il codice sorgente

emit parser error on empty files

Gil Pedersen 13 anni fa
parent
commit
3a03ba082b
1 ha cambiato i file con 2 aggiunte e 0 eliminazioni
  1. 2 0
      lib/m3u8.js

+ 2 - 0
lib/m3u8.js

@@ -117,6 +117,8 @@ function parse(stream, cb) {
   }
 
   function Complete() {
+    if (line_no === 0)
+      return ReportError(new ParserError('No line data', '', -1))
     cleanup();
     cb(null, m3u8);
   }