Skip to content

Commit

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

let basename;
let query = "";
let filename = file;
const hash = compilation.hash;
Expand All @@ -94,11 +93,9 @@ class BannerPlugin {

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

if (lastSlashIndex === -1) {
basename = filename;
} else {
basename = filename.substr(lastSlashIndex + 1);
}
const basename = lastSlashIndex
? filename
: filename.substr(lastSlashIndex + 1);

const data = {
hash,
Expand Down

0 comments on commit 4f003c2

Please sign in to comment.