Permalink
Browse files

fix(rest): fix crash when options is undefined in getServer

  • Loading branch information...
RangerRick committed Jul 25, 2017
1 parent e2e9d79 commit 7768b4804e5ac6e79ac7605f79304f473c709c3c
Showing with 4 additions and 1 deletion.
  1. +4 −1 src/rest/AbstractHTTP.ts
View
@@ -108,7 +108,10 @@ export abstract class AbstractHTTP implements IOnmsHTTP {
* with the HTTP implementation.
*/
protected getServer(options?: OnmsHTTPOptions) {
return options.server || this.serverObj;
if (options && options.server) {
return options.server;
}
return this.serverObj;
}
/**

0 comments on commit 7768b48

Please sign in to comment.