Skip to content

Commit

Permalink
minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesgeorge007 committed Aug 11, 2019
1 parent 4f003c2 commit aed5cce
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/BannerPlugin.js
Expand Up @@ -93,9 +93,10 @@ class BannerPlugin {

const lastSlashIndex = filename.lastIndexOf("/");

const basename = lastSlashIndex
? filename
: filename.substr(lastSlashIndex + 1);
const basename =
lastSlashIndex === -1
? filename
: filename.substr(lastSlashIndex + 1);

const data = {
hash,
Expand Down

0 comments on commit aed5cce

Please sign in to comment.