Skip to content

Commit 392d70b

Browse files
committed
Use lower cased comparison for roles
1 parent a53886d commit 392d70b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/common/helper.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -563,8 +563,8 @@ function cleanseReviews (reviews, roles) {
563563
const cleansedReviews = []
564564

565565
_.forEach(reviews, (review) => {
566-
const admin = _.filter(roles, role => role === 'Administrator')
567-
const copilot = _.filter(roles, role => role === 'Copilot')
566+
const admin = _.filter(roles, role => role.toLowerCase() === 'Administrator'.toLowerCase())
567+
const copilot = _.filter(roles, role => role.toLowerCase() === 'Copilot'.toLowerCase())
568568

569569
// User is neither admin nor copilot
570570
if (admin.length === 0 && copilot.length === 0) {

0 commit comments

Comments
 (0)