Skip to content

Commit 6d788c9

Browse files
committed
Fix errors
1 parent ac70690 commit 6d788c9

File tree

1 file changed

+3
-3
lines changed
  • packages/tailwindcss-language-server/src

1 file changed

+3
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -910,7 +910,7 @@ export class TW {
910910
// If the client does not suppory dynamic registration of completions then
911911
// we cannot update the set of trigger characters
912912
let client = this.initializeParams.capabilities
913-
if (client.textDocument?.completion?.dynamicRegistration) return
913+
if (!client.textDocument?.completion?.dynamicRegistration) return
914914

915915
// The new set of trigger characters is all the static ones plus
916916
// any characters from any separator in v3 config
@@ -927,10 +927,10 @@ export class TW {
927927
}
928928

929929
// If the trigger characters haven't changed then we don't need to do anything
930-
if (equal(Array.from(chars), Array.from(this.lastTriggerCharacters))) return
930+
if (equal(Array.from(chars), Array.from(this.lastTriggerCharacters ?? []))) return
931931
this.lastTriggerCharacters = chars
932932

933-
this.completionRegistration.dispose()
933+
this.completionRegistration?.dispose()
934934
this.completionRegistration = await this.connection.client.register(CompletionRequest.type, {
935935
documentSelector: null,
936936
resolveProvider: true,

0 commit comments

Comments
 (0)