提交 249e97d8 编写于 作者: S Sandeep Somavarapu

sync extension state only if version matches

上级 1eb2a37e
......@@ -357,11 +357,11 @@ export class ExtensionsSynchroniser extends AbstractSynchroniser implements IUse
if (added.length || updated.length) {
await Promise.all([...added, ...updated].map(async e => {
const installedExtension = installedExtensions.filter(installed => areSameExtensions(installed.identifier, e.identifier))[0];
const installedExtension = installedExtensions.find(installed => areSameExtensions(installed.identifier, e.identifier));
// Builtin Extension: Sync enablement and state
if (installedExtension && installedExtension.isBuiltin) {
if (e.state) {
if (e.state && installedExtension.manifest.version === e.version) {
const extensionState = JSON.parse(this.storageService.get(e.identifier.id, StorageScope.GLOBAL) || '{}');
forEach(e.state, ({ key, value }) => extensionState[key] = value);
this.storageService.store(e.identifier.id, JSON.stringify(extensionState), StorageScope.GLOBAL);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册