Skip to content

Commit

Permalink
Merge pull request #9559 from jamesgeorge007/feat/refactor-banner-plugin
Browse files Browse the repository at this point in the history
chore: Minor refactor
  • Loading branch information
sokra committed Aug 13, 2019
2 parents b50a995 + d7486fd commit 9f27d0c
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 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,10 @@ class BannerPlugin {

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

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

const data = {
hash,
Expand Down

0 comments on commit 9f27d0c

Please sign in to comment.