Browse Source

Avoids updating context if value matches

main
Eric Amodio 1 year ago
parent
commit
95b2a99cd7
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      src/system/context.ts

+ 2
- 0
src/system/context.ts View File

@ -14,6 +14,8 @@ export function getContext(key: ContextKeys, defaultValue?: T): T | undefined
}
export async function setContext(key: ContextKeys, value: unknown): Promise<void> {
if (contextStorage.get(key) === value) return;
contextStorage.set(key, value);
void (await executeCoreCommand('setContext', key, value));
_onDidChangeContext.fire(key);

Loading…
Cancel
Save