From 28bdc831a8efee2731c8ce34589dcf717081a4fb Mon Sep 17 00:00:00 2001 From: Mark Sujew Date: Fri, 14 Jul 2023 14:53:32 +0000 Subject: [PATCH] Compare global storage data using only `key` --- src/client/common/persistentState.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/client/common/persistentState.ts b/src/client/common/persistentState.ts index 48e885a676a2..76f6d2112fe0 100644 --- a/src/client/common/persistentState.ts +++ b/src/client/common/persistentState.ts @@ -173,7 +173,7 @@ export interface IPersistentStorage { */ export function getGlobalStorage(context: IExtensionContext, key: string, defaultValue?: T): IPersistentStorage { const globalKeysStorage = new PersistentState(context.globalState, GLOBAL_PERSISTENT_KEYS, []); - const found = globalKeysStorage.value.find((value) => value.key === key && value.defaultValue === defaultValue); + const found = globalKeysStorage.value.find((value) => value.key === key); if (!found) { const newValue = [{ key, defaultValue }, ...globalKeysStorage.value]; globalKeysStorage.updateValue(newValue).ignoreErrors();