We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c4d2ee5 commit 709c225Copy full SHA for 709c225
typescript/src/completions/switchCaseExcludeCovered.ts
@@ -3,6 +3,7 @@ import { cleanupEntryName } from '../utils'
3
4
// implementation not even ideal, but it just works for string & enums, which are used in 99% cases
5
export default (entries: ts.CompletionEntry[], position: number, sourceFile: ts.SourceFile, leftNode: ts.Node) => {
6
+ if (!leftNode.parent?.parent) return
7
let nodeComp = leftNode
8
let enumAccessExpr: string | null | undefined
9
if (ts.isStringLiteral(leftNode)) enumAccessExpr = null
0 commit comments