diff --git a/CHANGELOG.md b/CHANGELOG.md index b7d41e22c..7f8d02a99 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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` diff --git a/src/index.js b/src/index.js index 7db4ff06b..e97a1fda4 100644 --- a/src/index.js +++ b/src/index.js @@ -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))