Skip to content

Commit

Permalink
Revert changes to global.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
mark-wiemer committed Nov 8, 2024
1 parent 0afa18d commit 59db61b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/common/global.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ export class Global {

/** Gets config value from VS Code */
// todo move out of class
public static getConfig<T>(key: ConfigKey): T {
public static getConfig<T>(key: ConfigKey): T | undefined {
return (
// older versions of AHK++ used `ahk++` lowercase
// todo add deprecation warning for lowercase config vars
(vscode.workspace.getConfiguration('ahk++').get<T>(key) as T) ??
(vscode.workspace.getConfiguration(configPrefix).get<T>(key) as T)
vscode.workspace.getConfiguration('ahk++').get<T>(key) ??
vscode.workspace.getConfiguration(configPrefix).get<T>(key)
);
}

Expand Down

0 comments on commit 59db61b

Please sign in to comment.