From c1c73e74a1697f83b0e901ef70fcb4f351e3cd79 Mon Sep 17 00:00:00 2001 From: ShimaginAndrey Date: Thu, 1 Jul 2021 18:51:03 +0300 Subject: [PATCH] Refactoring code --- .../mobile/lib/controller/collaboration/Review.jsx | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/apps/common/mobile/lib/controller/collaboration/Review.jsx b/apps/common/mobile/lib/controller/collaboration/Review.jsx index a8769709c..98cc0a844 100644 --- a/apps/common/mobile/lib/controller/collaboration/Review.jsx +++ b/apps/common/mobile/lib/controller/collaboration/Review.jsx @@ -147,20 +147,8 @@ class ReviewChange extends Component { this.currentUserGroups = arr; } } - intersection (arr1, arr2) { //Computes the list of values that are the intersection of all the arrays. - const arr = []; - arr1.forEach((item1) => { - arr2.forEach((item2) => { - if (item1 === item2) { - arr.push(item2); - } - }); - }); - return arr; - } checkUserGroups (username) { - const groups = AscCommon.UserInfoParser.canEditReview(username); - return this.currentUserGroups && groups && (this.intersection(this.currentUserGroups, (groups.length>0) ? groups : [""]).length>0); + return this.currentUserGroups && AscCommon.UserInfoParser.canEditReview(username); } dateToLocaleTimeString (date) { const format = (date) => {