Skip to content

Commit 06a0cd6

Browse files
authored
Fix: replace whitespace before splitting project names (#35)
1 parent 98cd1c8 commit 06a0cd6

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/datasource.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,9 @@ export class DataSource extends DataSourceApi<LightstepQuery, LightstepDataSourc
125125

126126
/** Return the set of configured project names for data source */
127127
projects(): string[] {
128-
return this.projectName.split(',');
128+
// nb string replace removes optional whitespace between project names, eg:
129+
// "dev, pre-prod, prod" -> ["dev", "pre-prod", "prod"]
130+
return this.projectName.replace(/\s/g, '').split(',');
129131
}
130132

131133
/** Returns the first configured project name for data source */

0 commit comments

Comments
 (0)