Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
key
1 parent f4d7556 commit fc1c391Copy full SHA for fc1c391
src/client/common/persistentState.ts
@@ -173,7 +173,7 @@ export interface IPersistentStorage<T> {
173
*/
174
export function getGlobalStorage<T>(context: IExtensionContext, key: string, defaultValue?: T): IPersistentStorage<T> {
175
const globalKeysStorage = new PersistentState<KeysStorage[]>(context.globalState, GLOBAL_PERSISTENT_KEYS, []);
176
- const found = globalKeysStorage.value.find((value) => value.key === key && value.defaultValue === defaultValue);
+ const found = globalKeysStorage.value.find((value) => value.key === key);
177
if (!found) {
178
const newValue = [{ key, defaultValue }, ...globalKeysStorage.value];
179
globalKeysStorage.updateValue(newValue).ignoreErrors();
0 commit comments