Skip to content

Commit

Permalink
* changing options.ldap check to instance of instead of is function
Browse files Browse the repository at this point in the history
  • Loading branch information
bhoriuchi committed Aug 30, 2016
1 parent 8962a18 commit 04cb4e7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ function Strategy(options, verify) {
this._passwordField = options.passwordField || DEFAULT_PASSWORD_FIELD;
}

this._ad = typeof options.ldap === 'function' ? options.ldap : new ActiveDirectory(options.ldap);
this._ad = options.ldap instanceof ActiveDirectory ? options.ldap : new ActiveDirectory(options.ldap);
}

util.inherits(Strategy, passport.Strategy);
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "passport-activedirectory",
"version": "1.0.3",
"version": "1.0.4",
"description": "Active Directory strategy for passport.js",
"license": "MIT",
"main": "index.js",
Expand All @@ -19,9 +19,9 @@
"passport": "^0.3.0"
},
"devDependencies": {
"rollup": "^0.31.2",
"rollup-plugin-babel": "^2.5.1",
"babel-preset-es2015-rollup": "^1.1.1"
"rollup": "^0.34.10",
"rollup-plugin-babel": "^2.6.1",
"babel-preset-es2015-rollup": "^1.2.0"
},
"bugs": {
"url": "https://github.com/bhoriuchi/passport-activedirectory/issues"
Expand Down
2 changes: 1 addition & 1 deletion src/strategy.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ function Strategy (options, verify) {
this._passwordField = options.passwordField || DEFAULT_PASSWORD_FIELD;
}

this._ad = (typeof options.ldap === 'function') ? options.ldap : new ActiveDirectory(options.ldap)
this._ad = (options.ldap instanceof ActiveDirectory) ? options.ldap : new ActiveDirectory(options.ldap)
}

util.inherits(Strategy, passport.Strategy)
Expand Down

0 comments on commit 04cb4e7

Please sign in to comment.