Skip to content

Commit

Permalink
allow endpoints without a config hook
Browse files Browse the repository at this point in the history
  • Loading branch information
guybedford committed Oct 3, 2014
1 parent 1085db5 commit a145dc4
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions lib/endpoint.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,8 @@ exports.configure = function(endpoint) {
throw 'Endpoint handler `' + handler + '` not installed.';
}

if (!endpointClass.configure)
return;

endpointConfig.name = endpoint;
return Promise.resolve(endpointClass.configure(endpointConfig, ui))
return Promise.resolve(endpointClass.configure && endpointClass.configure(endpointConfig, ui) || endpointConfig)
.then(function(_config) {
delete _config.name;
_config.handler = handler;
Expand Down

0 comments on commit a145dc4

Please sign in to comment.