Skip to content

Commit d0a1eca

Browse files
committed
make ssr style injection idempotent
1 parent cbee333 commit d0a1eca

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lib/addStylesServer.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,10 @@ function addStyleProd (styles, list) {
3838
var id = part.media || 'default'
3939
var style = styles[id]
4040
if (style) {
41-
style.ids.push(part.id)
42-
style.css += '\n' + part.css
41+
if (style.ids.indexOf(part.id) < 0) {
42+
style.ids.push(part.id)
43+
style.css += '\n' + part.css
44+
}
4345
} else {
4446
styles[id] = {
4547
ids: [part.id],

0 commit comments

Comments
 (0)