Skip to content

Commit 13acfab

Browse files
committed
Allow composed datasources to be disabled
1 parent e3254ee commit 13acfab

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

lib/datasources/CompositeDatasource.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,10 @@ function CompositeDatasource(options) {
2323
if (!datasource) {
2424
throw new Error("No datasource " + datasourceName + " could be found!");
2525
}
26-
if (datasource.enabled === false) {
27-
throw new Error("Datasource " + datasourceName + " must be enabled!");
26+
if (datasource.enabled !== false) {
27+
this._datasources[datasourceName] = datasource;
28+
this._datasourceNames.push(datasourceName);
2829
}
29-
this._datasources[datasourceName] = datasource;
30-
this._datasourceNames.push(datasourceName);
3130
}
3231
}
3332
Datasource.extend(CompositeDatasource);

0 commit comments

Comments
 (0)