Skip to content

Commit bd80b78

Browse files
arunodatimneutkens
authored andcommitted
Handle undefined assets when combining. (vercel#1569)
It's possible for common.js to be empty in certain cases. So, we need to handle it.
1 parent 4a069e9 commit bd80b78

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

server/build/plugins/combine-assets-plugin.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@ export default class CombineAssetsPlugin {
1111
compiler.plugin('after-compile', (compilation, callback) => {
1212
let newSource = ''
1313
this.input.forEach((name) => {
14-
newSource += `${compilation.assets[name].source()}\n`
14+
const asset = compilation.assets[name]
15+
if (!asset) return
16+
17+
newSource += `${asset.source()}\n`
1518
delete compilation.assets[name]
1619
})
1720

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy