Merge pull request #9559 from jamesgeorge007/feat/refactor-banner-plugin

chore: Minor refactor
This commit is contained in:
Tobias Koppers 2019-08-13 13:38:45 +02:00 committed by GitHub
commit 9f27d0c6c8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 6 deletions

View File

@ -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,