Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 17e7dc7

Browse files
posvaLoveofRedMoonjohnleider
committedAug 25, 2020
fix(ssr): avoid missing files in manifest
Co-authored-by: chenyj <[email protected]> Co-authored-by: johnleider <[email protected]>
1 parent bb253db commit 17e7dc7

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed
 

Diff for: ‎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)
Please sign in to comment.