Skip to content

Commit db7d210

Browse files
authored
Fix: Early return if there are no queries to make (#44)
1 parent 6b56385 commit db7d210

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/datasource.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@ export class DataSource extends DataSourceApi<LightstepQuery, LightstepDataSourc
5050

5151
// Only make requests for non-empty, non-hidden queries
5252
const visibleTargets = request.targets.filter((query) => query.text && !query.hide);
53+
if (visibleTargets.length === 0) {
54+
return { data: [] };
55+
}
5356

5457
const projectName = visibleTargets[0].projectName;
5558
const notebookURL = createNotebookURL(request, visibleTargets, projectName);

0 commit comments

Comments
 (0)