Remove path.extname() check

Remove path.extname() check to fix build:production task.

Currently path.extname() is being supplied an object when it expects a string, resulting in a fatal error during production builds.

Removal is the cleanest solution as it's an unnecessary check, assets[name] will always be an object.
This commit is contained in:
WatsonWeb
2016-07-02 03:46:16 -05:00
committed by GitHub
parent ca4db00fab
commit 1ce8b1df71

View File

@@ -44,12 +44,10 @@ var assetsPluginProcessOutput = function (assets) {
for (name in assets) { for (name in assets) {
if (assets.hasOwnProperty(name)) { if (assets.hasOwnProperty(name)) {
if (path.extname(assets[name]) === '') { for (ext in assets[name]) {
for (ext in assets[name]) { if (assets[name].hasOwnProperty(ext)) {
if (assets[name].hasOwnProperty(ext)) { filename = name + '.' + ext;
filename = name + '.' + ext; results[filename] = path.basename(assets[name][ext]);
results[filename] = path.basename(assets[name][ext]);
}
} }
} }
} }