Skip to content

Commit

Permalink
allow providers without routes
Browse files Browse the repository at this point in the history
  • Loading branch information
dmfenton committed Feb 14, 2017
1 parent 177adea commit f3fc234
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).

## Unreleased
### Fixed
* Allow providers without routes to be registered

## [3.1.0] - 2017-02-13
### Added
* CRD API for datasets in cache at `/datasets/:id`
Expand Down
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ function bindPluginOverrides (provider, controller, server, pluginRoutes) {
})
}

function bindRouteSet (routes, controller, server) {
function bindRouteSet (routes = [], controller, server) {
routes.forEach(route => {
route.methods.forEach(method => {
server[method](route.path, controller[route.handler].bind(controller))
Expand Down

0 comments on commit f3fc234

Please sign in to comment.