Skip to content

Commit 08aaef6

Browse files
author
Tom Kirkpatrick
committed
Always return an array from getCurrentUserGroups
1 parent 383fcab commit 08aaef6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/utils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ module.exports = class AccessUtils {
216216
*/
217217
getCurrentUserGroups() {
218218
const ctx = this.app.loopback.getCurrentContext();
219-
const currentUserGroups = ctx && ctx.get('currentUserGroups') || null;
219+
const currentUserGroups = ctx && ctx.get('currentUserGroups') || [];
220220

221221
if (ctx) {
222222
debug('currentUserGroups(): %o', currentUserGroups);

0 commit comments

Comments
 (0)