Skip to content

Commit e116804

Browse files
committed
fix eslint-plugin-svelte3 patch to support componentes without style tag
1 parent a4d11fc commit e116804

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/preprocess.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ export const preprocess = (text, filename) => {
174174
if (module.start > html.start) {
175175
modulePreOffset += markupDiff;
176176
}
177-
if (module.start > css.start) {
177+
if (css && module.start > css.start) {
178178
modulePreOffset += styleDiff;
179179
}
180180
if (instance && module.start > instance.start) {
@@ -190,7 +190,7 @@ export const preprocess = (text, filename) => {
190190
if (instance.start > html.start) {
191191
instancePreOffset += markupDiff;
192192
}
193-
if (instance.start > css.start) {
193+
if (css && instance.start > css.start) {
194194
instancePreOffset += styleDiff;
195195
}
196196
if (module && instance.start > module.start) {

0 commit comments

Comments
 (0)