Skip to content

Commit

Permalink
perf(extension): skip some extra condition
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon-He95 authored and johnsoncodehk committed Dec 27, 2023
1 parent d909b35 commit 1366ddb
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions extensions/vscode/src/features/doctor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: [
Expand All @@ -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: [
Expand Down

0 comments on commit 1366ddb

Please sign in to comment.