Skip to content

Commit

Permalink
prevent erroneous <style>undefined</style> - fixes #516 (#578)
Browse files Browse the repository at this point in the history
  • Loading branch information
Rich Harris authored Mar 19, 2021
1 parent ef8dbcf commit 04f17f5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/old-files-jump.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sveltejs/kit': patch
---

Prevent erronous <style>undefined</style>
2 changes: 1 addition & 1 deletion packages/kit/src/runtime/server/page.js
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ async function get_response({ request, options, $session, route, status = 200, e

const head = [
rendered.head,
options.amp ? '' : `<style data-svelte>${style}</style>`,
style && !options.amp ? `<style data-svelte>${style}</style>` : '',
links,
init
].join('\n\n');
Expand Down

0 comments on commit 04f17f5

Please sign in to comment.