oauthjs / node-oauth2-server

Complete, compliant and well tested module for implementing an OAuth2 Server/Provider with express in node.js

Home Page:https://npmjs.org/package/oauth2-server

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Array.isArray instead of instanceof

msupra opened this issue · comments

Hi
In handlers/token-handler.js, you use instanceof at line 145:

if (!(client.grants instanceof Array)) {

This causes my grants array to fail, even though it is an array. Can you maybe change it to:

if (!(Array.isArray(client.grants))) {

Regards
Morne