Skip to content

Commit 2212d0c

Browse files
committed
chore: prioritize manifest version install status
1 parent e5a5c73 commit 2212d0c

File tree

1 file changed

+4
-6
lines changed
  • packages/electron-chrome-web-store/src/browser

1 file changed

+4
-6
lines changed

packages/electron-chrome-web-store/src/browser/api.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,10 @@ function getExtensionInstallStatus(
5050
extensionId: ExtensionId,
5151
manifest?: chrome.runtime.Manifest,
5252
) {
53+
if (manifest && manifest.manifest_version < state.minimumManifestVersion) {
54+
return ExtensionInstallStatus.DEPRECATED_MANIFEST_VERSION
55+
}
56+
5357
if (state.denylist?.has(extensionId)) {
5458
return ExtensionInstallStatus.BLOCKED_BY_POLICY
5559
}
@@ -58,12 +62,6 @@ function getExtensionInstallStatus(
5862
return ExtensionInstallStatus.BLOCKED_BY_POLICY
5963
}
6064

61-
if (manifest) {
62-
if (manifest.manifest_version < state.minimumManifestVersion) {
63-
return ExtensionInstallStatus.DEPRECATED_MANIFEST_VERSION
64-
}
65-
}
66-
6765
const extensions = state.session.getAllExtensions()
6866
const extension = extensions.find((ext) => ext.id === extensionId)
6967

0 commit comments

Comments
 (0)