Skip to content

Commit 8efb608

Browse files
committed
handling for empty query in groupType, fixes filter error
1 parent 5f18d6f commit 8efb608

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/graph/graph.groups.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ export async function findGroups(
9292
filterGroups.push('(mailEnabled eq true and securityEnabled eq false)');
9393
}
9494

95-
filterQuery += ' and ' + filterGroups.join(' or ');
95+
filterQuery += (query !== '' ? ' and ' : '') + filterGroups.join(' or ');
9696
}
9797

9898
const result = await graph

0 commit comments

Comments
 (0)