Skip to content

Commit 18dcc70

Browse files
committed
Bail from getProject when given a non-file URI
It’ll fail matching things *anyway* so we can just bail earlier
1 parent d932f28 commit 18dcc70

File tree

1 file changed

+9
-0
lines changed
  • packages/tailwindcss-language-server/src

1 file changed

+9
-0
lines changed

packages/tailwindcss-language-server/src/tw.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -995,6 +995,15 @@ export class TW {
995995
let matchedPriority: number = Infinity
996996

997997
let uri = URI.parse(document.uri)
998+
999+
if (uri.scheme !== 'file') {
1000+
console.debug(`Cannot get project for a non-file document. They are unsupported.`, {
1001+
uri: uri.toString(),
1002+
})
1003+
1004+
return null
1005+
}
1006+
9981007
let fsPath = uri.fsPath
9991008
let normalPath = uri.path
10001009

0 commit comments

Comments
 (0)