summaryrefslogtreecommitdiff
path: root/apps/couch/src/couch_js_functions.hrl
diff options
context:
space:
mode:
Diffstat (limited to 'apps/couch/src/couch_js_functions.hrl')
-rw-r--r--apps/couch/src/couch_js_functions.hrl2
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/couch/src/couch_js_functions.hrl b/apps/couch/src/couch_js_functions.hrl
index 1f314f6e..32573a90 100644
--- a/apps/couch/src/couch_js_functions.hrl
+++ b/apps/couch/src/couch_js_functions.hrl
@@ -31,7 +31,7 @@
throw({forbidden: 'doc.name is required'});
}
- if (!(newDoc.roles && (typeof newDoc.roles.length !== 'undefined'))) {
+ if (newDoc.roles && !isArray(newDoc.roles)) {
throw({forbidden: 'doc.roles must be an array'});
}