Skip to content
This repository has been archived by the owner on Aug 29, 2018. It is now read-only.

Commit

Permalink
fix(parse): handle null value of matches (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 authored and shellscape committed Mar 27, 2018
1 parent f8b72fd commit f62b87a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/parse.js
Expand Up @@ -16,7 +16,7 @@ module.exports = {
// some loaders populate chunkNames
if (!name) {
const matches = assetFile.match(/\.[\w]+$/);
name = matches.length > 0 ? matches[0].substring(1) : '<unknown>';
name = (matches && matches.length > 0) ? matches[0].substring(1) : '<unknown>';
}

result.push([
Expand Down

0 comments on commit f62b87a

Please sign in to comment.