Skip to content
Permalink
Browse files
Merge pull request #9559 from jamesgeorge007/feat/refactor-banner-plugin
chore: Minor refactor
  • Loading branch information
sokra committed Aug 13, 2019
2 parents b50a995 + d7486fd commit 9f27d0c6c8370774b583483b42b57774b723b9ff
Showing with 4 additions and 6 deletions.
  1. +4 −6 lib/BannerPlugin.js
@@ -81,7 +81,6 @@ class BannerPlugin {
continue;
}

let basename;
let query = "";
let filename = file;
const hash = compilation.hash;
@@ -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,

0 comments on commit 9f27d0c

Please sign in to comment.