File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
packages/tailwindcss-language-service/src/util Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -296,10 +296,10 @@ export async function findClassListsInRange(
296
296
mode ?: 'html' | 'css' | 'jsx' ,
297
297
includeCustom : boolean = true
298
298
) : Promise < DocumentClassList [ ] > {
299
- let classLists : DocumentClassList [ ]
299
+ let classLists : DocumentClassList [ ] = [ ]
300
300
if ( mode === 'css' ) {
301
301
classLists = findClassListsInCssRange ( state , doc , range )
302
- } else {
302
+ } else if ( mode === 'html' || mode === 'jsx' ) {
303
303
classLists = await findClassListsInHtmlRange ( state , doc , mode , range )
304
304
}
305
305
return dedupeByRange ( [
@@ -449,6 +449,8 @@ export async function findClassNameAtPosition(
449
449
classNames = await findClassNamesInRange ( state , doc , searchRange , 'html' )
450
450
} else if ( isJsxContext ( state , doc , position ) ) {
451
451
classNames = await findClassNamesInRange ( state , doc , searchRange , 'jsx' )
452
+ } else {
453
+ classNames = await findClassNamesInRange ( state , doc , searchRange )
452
454
}
453
455
454
456
if ( classNames . length === 0 ) {
You can’t perform that action at this time.
0 commit comments