Skip to content

Commit

Permalink
fix: `INSTALLATION FAILED: Can't evaluate field ApiVersion in type in…
Browse files Browse the repository at this point in the history
…terface {}`
  • Loading branch information
fResult committed Sep 21, 2024
1 parent 53f642a commit ed17293
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/CompletionProviders/ChartCompletionItemProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,9 @@ export class ChartCompletionItemProvider implements vscode.CompletionItemProvide
case 'string':
case 'boolean':
case 'number':
const valueItem = new vscode.CompletionItem(key.charAt(0).toUpperCase() + key.slice(1), vscode.CompletionItemKind.Field);
// NOTE: APIVersion is a special case, as it is not camelCase for `{{ .Chart.APIVersion }}`.
const completionText = key === 'apiVersion' ? 'APIVersion' : key.charAt(0).toUpperCase() + key.slice(1);
const valueItem = new vscode.CompletionItem(completionText, vscode.CompletionItemKind.Field);
valueItem.detail = currentKey[key].toString();
keys.push(valueItem);
break;
Expand Down

0 comments on commit ed17293

Please sign in to comment.