Skip to content

Commit 928f603

Browse files
authored
Merge pull request #635 from sveltejs/gh-634
correctly handle empty <style> tag
2 parents 61f5cbe + 051534e commit 928f603

File tree

4 files changed

+6
-2
lines changed

4 files changed

+6
-2
lines changed

src/generators/dom/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ export default function dom(
222222
this._yield = options._yield;
223223
224224
this._torndown = false;
225-
${parsed.css &&
225+
${generator.css &&
226226
options.css !== false &&
227227
`if ( !document.getElementById( ${JSON.stringify(
228228
generator.cssId + '-style'

src/utils/deindent.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
const start = /\n(\t+)/;
22

3-
export default function deindent(strings: string[], ...values: any[]) {
3+
export default function deindent(strings: TemplateStringsArray, ...values: any[]) {
44
const indentation = start.exec(strings[0])[1];
55
const pattern = new RegExp(`^${indentation}`, 'gm');
66

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export default {
2+
html: '',
3+
};
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<style></style>

0 commit comments

Comments
 (0)