Skip to content

Commit

Permalink
Fix logic error *facepalm*
Browse files Browse the repository at this point in the history
  • Loading branch information
sjones6 committed May 30, 2017
1 parent e939a18 commit d2fc044
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lib/verify.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,19 +46,19 @@ Gun.on('opt', function(context) {
var opt = context.opt || {};
var ws = opt.ws || {};

if (!opt.verify) {
this.to.next(context);
return;
}

/**
* verify when instantiating Gun can contain the following keys:
* allowOrigins: Array|RegExp|String
* auth: String|Function
* authKey: String
* check: Function
*/
var verify = opt.verify || {};
if (!verify) {
this.to.next(context);
return;
}

var verify = opt.verify;
if (ws.verifyClient && !verify.override) {
throw Error('Cannot override existing verifyClient option in `ws` configuration.');
}
Expand Down

0 comments on commit d2fc044

Please sign in to comment.