Skip to content

Commit 1366ddb

Browse files
Simon-He95johnsoncodehk
authored andcommitted
perf(extension): skip some extra condition
1 parent d909b35 commit 1366ddb

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

extensions/vscode/src/features/doctor.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,8 @@ export async function register(context: vscode.ExtensionContext, client: BaseLan
9494
message: string;
9595
}[] = [];
9696

97-
// check vue version < 2.7 but @vue/runtime-dom missing
9897
if (vueMod && semver.lt(vueMod.json.version, '2.7.0') && !domMod) {
98+
// check vue version < 2.7 but @vue/runtime-dom missing
9999
problems.push({
100100
title: '`@vue/runtime-dom` missing for Vue 2',
101101
message: [
@@ -105,9 +105,8 @@ export async function register(context: vscode.ExtensionContext, client: BaseLan
105105
].join('\n'),
106106
});
107107
}
108-
109-
// check vue version >= 2.7 and < 3 but installed @vue/runtime-dom
110-
if (vueMod && semver.gte(vueMod.json.version, '2.7.0') && semver.lt(vueMod.json.version, '3.0.0') && domMod) {
108+
else if (vueMod && semver.gte(vueMod.json.version, '2.7.0') && semver.lt(vueMod.json.version, '3.0.0') && domMod) {
109+
// check vue version >= 2.7 and < 3 but installed @vue/runtime-dom
111110
problems.push({
112111
title: 'Unnecessary `@vue/runtime-dom`',
113112
message: [

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy