From 7e1a61c9d37ba0a3348476c3295f22d1d6cca31b Mon Sep 17 00:00:00 2001 From: Simon He <57086651+Simon-He95@users.noreply.github.com> Date: Wed, 6 Dec 2023 13:18:49 +0800 Subject: [PATCH] perf(extension): skip some extra condition (#3781) --- extensions/vscode/src/features/doctor.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/extensions/vscode/src/features/doctor.ts b/extensions/vscode/src/features/doctor.ts index 33a2885cf0..ef367339a8 100644 --- a/extensions/vscode/src/features/doctor.ts +++ b/extensions/vscode/src/features/doctor.ts @@ -94,8 +94,8 @@ export async function register(context: vscode.ExtensionContext, client: BaseLan message: string; }[] = []; - // check vue version < 2.7 but @vue/runtime-dom missing if (vueMod && semver.lt(vueMod.json.version, '2.7.0') && !domMod) { + // check vue version < 2.7 but @vue/runtime-dom missing problems.push({ title: '`@vue/runtime-dom` missing for Vue 2', message: [ @@ -105,9 +105,8 @@ export async function register(context: vscode.ExtensionContext, client: BaseLan ].join('\n'), }); } - - // check vue version >= 2.7 and < 3 but installed @vue/runtime-dom - if (vueMod && semver.gte(vueMod.json.version, '2.7.0') && semver.lt(vueMod.json.version, '3.0.0') && domMod) { + else if (vueMod && semver.gte(vueMod.json.version, '2.7.0') && semver.lt(vueMod.json.version, '3.0.0') && domMod) { + // check vue version >= 2.7 and < 3 but installed @vue/runtime-dom problems.push({ title: 'Unnecessary `@vue/runtime-dom`', message: [