diff options
-rw-r--r-- | src/couchdb/couch_js_functions.hrl | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/couchdb/couch_js_functions.hrl b/src/couchdb/couch_js_functions.hrl index 347cc7b0..a2a40b3c 100644 --- a/src/couchdb/couch_js_functions.hrl +++ b/src/couchdb/couch_js_functions.hrl @@ -121,8 +121,7 @@ 'non-empty string.'); } - if ((typeof user_ctx.roles !== 'undefined') && - (typeof user_ctx.roles.length !== 'number')) { + if (user_ctx.roles && !isArray(user_ctx.roles)) { reportError('The roles property of the user_ctx must be ' + 'an array of strings.'); } |