diff --git a/src/platforms/web/server/modules/style.js b/src/platforms/web/server/modules/style.js index 69fccd10..8c66ed01 100644 --- a/src/platforms/web/server/modules/style.js +++ b/src/platforms/web/server/modules/style.js @@ -8,7 +8,7 @@ function genStyleText (vnode: VNode): string { for (const key in style) { styleText += `${hyphenate(key)}:${style[key]};` } - return styleText.slice(0, -1) + return styleText } export default function renderStyle (vnode: VNodeWithData): ?string { diff --git a/test/ssr/ssr-string.spec.js b/test/ssr/ssr-string.spec.js index 808a86cc..c8049560 100644 --- a/test/ssr/ssr-string.spec.js +++ b/test/ssr/ssr-string.spec.js @@ -102,7 +102,7 @@ describe('SSR: renderToString', () => { } }, result => { expect(result).toContain( - '
' + '' ) done() }) @@ -116,7 +116,7 @@ describe('SSR: renderToString', () => { } }, result => { expect(result).toContain( - '' + '' ) done() }) @@ -135,7 +135,7 @@ describe('SSR: renderToString', () => { } }, result => { expect(result).toContain( - '