fix bad insertText

Closes #363
This commit is contained in:
Qiming Zhao 2022-05-02 14:44:37 +08:00
parent f27b21cb52
commit 4dbde8211c
No known key found for this signature in database
GPG key ID: 9722CD0E8D4DCB8C

View file

@ -76,7 +76,7 @@ export function convertCompletionEntry(
if (tsEntry.kindModifiers) {
const kindModifiers = new Set(tsEntry.kindModifiers.split(/,|\s+/g))
if (kindModifiers.has(PConst.KindModifiers.optional)) {
insertText = label
insertText = insertText ?? label
label += '?'
}