fix(vite): use forEach on NodeList not Element (#1734)

This commit is contained in:
Daniel Roe 2021-11-05 13:54:13 +00:00 committed by GitHub
parent 596c8c5476
commit 90487fde0c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -18,7 +18,7 @@ export function devStyleSSRPlugin (rootDir: string): Plugin {
// When dev `<style>` is injected, remove the `<link>` styles from manifest // When dev `<style>` is injected, remove the `<link>` styles from manifest
// TODO: Use `app.assetsPath` or unique hash // TODO: Use `app.assetsPath` or unique hash
return code + `\ndocument.querySelector(\`link[href="/_nuxt${moduleId}"]\`).forEach(i=>i.remove())` return code + `\ndocument.querySelectorAll(\`link[href="/_nuxt${moduleId}"]\`).forEach(i=>i.remove())`
} }
} }
} }