From 18dd2e7b096ac9ea3a2b356743358fba80184c29 Mon Sep 17 00:00:00 2001 From: Brad Cornes Date: Tue, 28 Mar 2023 11:59:47 +0100 Subject: [PATCH] Ensure `itemDefaults.data` is used in VS Code Insiders --- packages/tailwindcss-language-server/src/server.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/tailwindcss-language-server/src/server.ts b/packages/tailwindcss-language-server/src/server.ts index 8495be0..db27992 100644 --- a/packages/tailwindcss-language-server/src/server.ts +++ b/packages/tailwindcss-language-server/src/server.ts @@ -391,7 +391,7 @@ async function createProjectService( // VS Code _does_ support `itemDefaults.data` since at least 1.67.0 (this extension's min version) // but it doesn't advertise it in its capabilities. So we manually add it here. // See also: https://github.com/microsoft/vscode-languageserver-node/issues/1181 - if (params.clientInfo?.name === 'Visual Studio Code' && !itemDefaults.includes('data')) { + if (params.clientInfo?.name?.includes('Visual Studio Code') && !itemDefaults.includes('data')) { itemDefaults.push('data') }