Skip to content

Commit 0560999

Browse files
committed
feat(diagram): suggestions from code review - #364
1 parent 520bf87 commit 0560999

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/flowr/diagrams/diagram.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ class DiagramUpdateCoordinator {
7070

7171
// Don't show a panel if generation failed
7272
if(mermaid === '') {
73+
await vscode.window.showErrorMessage('Failed to generate diagram - FlowR Analyzer Session is not ready. Check if flowrR is connected and try again.');
7374
return;
7475
}
7576

src/flowr/internal-session.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ export class FlowrInternalSession implements FlowrSession {
110110
// Wait for the flowr session
111111
if(!this.parser) {
112112
const times = [3000, 2000, 1000];
113-
while(times.length != 0) {
113+
while(times.length !== 0) {
114114
const timeout = times.pop();
115115
this.outputChannel.appendLine(`FlowR Session not available - retrying in ${timeout}ms`);
116116
await new Promise(res => setTimeout(res, timeout));
@@ -122,7 +122,6 @@ export class FlowrInternalSession implements FlowrSession {
122122

123123
if(!this.parser) {
124124
this.setWorking(false);
125-
await vscode.window.showErrorMessage('Failed to generate diagram - FlowR Analyzer Session is not ready!');
126125
return defaultOnErr;
127126
}
128127
}

0 commit comments

Comments
 (0)