1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

fix registry error detection

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton 2021-04-12 13:39:14 -04:00
parent 9cda447d6b
commit 403abed762

View File

@ -271,7 +271,7 @@ export async function attemptInstallByInfo({ name, version, requireConfirmation
const { promise } = downloadJson({ url: registryUrl });
const json = await promise.catch(console.error);
if (!json || json.error || typeof json.values !== "object" || !json.values) {
if (!json || json.error || typeof json.versions !== "object" || !json.versions) {
const message = json?.error ? `: ${json.error}` : "";
Notifications.error(`Failed to get registry information for that extension${message}`);