Skip to content

Commit b00a526

Browse files
committed
hack: don't crash with typescript-explorer installed
1 parent 81043ea commit b00a526

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

typescript/src/decorateProxy.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,15 @@ export const decorateLanguageService = (
4848
let prevCompletionsAdittionalData: PrevCompletionsAdditionalData
4949
// eslint-disable-next-line complexity
5050
proxy.getCompletionsAtPosition = (fileName, position, options, formatOptions) => {
51+
if (options?.triggerCharacter && typeof options.triggerCharacter !== 'string') {
52+
return languageService.getCompletionsAtPosition(fileName, position, options)
53+
}
5154
const updateConfigCommand = 'updateConfig'
5255
if (options?.triggerCharacter?.startsWith(updateConfigCommand)) {
5356
config.config = JSON.parse(options.triggerCharacter.slice(updateConfigCommand.length))
5457
return { entries: [] }
5558
}
59+
5660
const specialCommandResult = options?.triggerCharacter
5761
? handleSpecialCommand(
5862
fileName,

0 commit comments

Comments
 (0)