Skip to content

Commit b6ba0bb

Browse files
committed
Create showResultsInternal method
1 parent 496d05c commit b6ba0bb

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

extensions/ql-vscode/src/compare/compare-view.ts

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,17 @@ export class CompareView extends AbstractWebview<
5858
selectedResultSetName?: string,
5959
) {
6060
this.comparePair = { from, to };
61+
62+
await this.showResultsInternal(selectedResultSetName);
63+
}
64+
65+
private async showResultsInternal(selectedResultSetName?: string) {
66+
if (!this.comparePair) {
67+
return;
68+
}
69+
70+
const { from, to } = this.comparePair;
71+
6172
const panel = await this.getPanel();
6273
panel.reveal(undefined, true);
6374

@@ -204,14 +215,7 @@ export class CompareView extends AbstractWebview<
204215
}
205216

206217
private async changeTable(newResultSetName: string) {
207-
if (!this.comparePair?.from || !this.comparePair.to) {
208-
return;
209-
}
210-
await this.showResults(
211-
this.comparePair.from,
212-
this.comparePair.to,
213-
newResultSetName,
214-
);
218+
await this.showResultsInternal(newResultSetName);
215219
}
216220

217221
private async getResultSet(

0 commit comments

Comments
 (0)