Skip to content

Commit b97606c

Browse files
posvaLoveofRedMoonjohnleider
authored
fix(ssr): avoid missing files in manifest (#11609)
Co-authored-by: chenyj <[email protected]> Co-authored-by: johnleider <[email protected]>
1 parent 579e1ff commit b97606c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/server/template-renderer/create-async-file-mapper.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,11 @@ function mapIdToFile (id, clientManifest) {
4444
fileIndices.forEach(index => {
4545
const file = clientManifest.all[index]
4646
// only include async files or non-js, non-css assets
47-
if (clientManifest.async.indexOf(file) > -1 || !(/\.(js|css)($|\?)/.test(file))) {
47+
if (
48+
file &&
49+
(clientManifest.async.indexOf(file) > -1 ||
50+
!/\.(js|css)($|\?)/.test(file))
51+
) {
4852
files.push(file)
4953
}
5054
})

0 commit comments

Comments
 (0)