Skip to content
This repository was archived by the owner on Feb 27, 2025. It is now read-only.

Commit ddc6772

Browse files
committed
Fix a bug.
1 parent 1a2e7a8 commit ddc6772

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

src/extension.ts

+8-3
Original file line numberDiff line numberDiff line change
@@ -176,10 +176,15 @@ export function activate(context: vscode.ExtensionContext) {
176176

177177
let locs = [];
178178

179-
if (mlDef.uri.toString() === mliDef.uri.toString() && mlDef.range.isEqual(mliDef.range)) {
180-
locs = [mlDef];
179+
if (mlDef && mliDef) {
180+
if (mlDef.uri.toString() === mliDef.uri.toString() && mlDef.range.isEqual(mliDef.range)) {
181+
locs = [mlDef];
182+
} else {
183+
locs = [mliDef, mlDef];
184+
}
181185
} else {
182-
locs = [mliDef, mlDef];
186+
if (mliDef) locs.push(mliDef);
187+
if (mlDef) locs.push(mlDef);
183188
}
184189

185190
return locs;

0 commit comments

Comments
 (0)