Skip to content
This repository was archived by the owner on Nov 16, 2023. It is now read-only.

Commit 8c8a83c

Browse files
committed
1 parent 72661d1 commit 8c8a83c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/references/model.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -338,9 +338,11 @@ export class ReferenceItem {
338338
}
339339
if (warmUpNext) {
340340
// load next document once this document has been loaded
341-
const next = <FileItem>this.file.model.next(this.file);
342-
if (next !== this.file) {
341+
const next = this.file.model.next(this.file);
342+
if (next instanceof FileItem && next !== this.file) {
343343
vscode.workspace.openTextDocument(next.uri);
344+
} else if (next instanceof ReferenceItem) {
345+
vscode.workspace.openTextDocument(next.location.uri);
344346
}
345347
}
346348
return this._document;

0 commit comments

Comments
 (0)