mirror of
https://github.com/microsoft/vscode.git
synced 2026-10-05 15:36:22 +01:00
Fix #42709
This commit is contained in:
1 parent
23b09a28e7
commit
b722b506f8
2 files changed
+4
-4
No files matched your search
@@ -93,7 +93,7 @@ async function _activate(context: ExtensionContext, disposables: Disposable[]):
|
||||
}
|
||||
|
||||
export function activate(context: ExtensionContext): API {
|
||||
const config = workspace.getConfiguration('git', null as any as undefined);
|
||||
const config = workspace.getConfiguration('git', null);
|
||||
const enabled = config.get<boolean>('enabled');
|
||||
|
||||
const disposables: Disposable[] = [];
|
||||
@@ -104,8 +104,8 @@ export function activate(context: ExtensionContext): API {
|
||||
if (enabled) {
|
||||
activatePromise = _activate(context, disposables);
|
||||
} else {
|
||||
const onConfigChange = filterEvent(workspace.onDidChangeConfiguration, e => e.affectsConfiguration('git', null as any as undefined));
|
||||
const onEnabled = filterEvent(onConfigChange, () => workspace.getConfiguration('git', null as any as undefined).get<boolean>('enabled') === true);
|
||||
const onConfigChange = filterEvent(workspace.onDidChangeConfiguration, e => e.affectsConfiguration('git'));
|
||||
const onEnabled = filterEvent(onConfigChange, () => workspace.getConfiguration('git', null).get<boolean>('enabled') === true);
|
||||
|
||||
activatePromise = eventToPromise(onEnabled)
|
||||
.then(() => _activate(context, disposables));
|
||||
|
||||
Vendored
+1
-1
@@ -5602,7 +5602,7 @@ declare module 'vscode' {
|
||||
* @param resource A resource for which the configuration is asked for
|
||||
* @return The full configuration or a subset.
|
||||
*/
|
||||
export function getConfiguration(section?: string, resource?: Uri): WorkspaceConfiguration;
|
||||
export function getConfiguration(section?: string, resource?: Uri | null): WorkspaceConfiguration;
|
||||
|
||||
/**
|
||||
* An event that is emitted when the [configuration](#WorkspaceConfiguration) changed.
|
||||
|
||||
Reference in new issue
Block a user