Skip to content

Commit

Permalink
fix(router-configuration): throw early on invalid pipeline steps
Browse files Browse the repository at this point in the history
  • Loading branch information
doktordirk committed May 16, 2018
1 parent fb09343 commit e6e2f62
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/router-configuration.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ export class RouterConfiguration {
* @chainable
*/
addPipelineStep(name: string, step: Function|PipelineStep): RouterConfiguration {
if (step === null || step === undefined) {
throw new Error('Pipeline step cannot be null or undefined.');
}
this.pipelineSteps.push({name, step});
return this;
}
Expand Down

0 comments on commit e6e2f62

Please sign in to comment.