From da5f94247d3123920dd9a71902482e4e3dcae91a Mon Sep 17 00:00:00 2001 From: yuzuki999 Date: Thu, 9 Jun 2022 21:40:23 +0800 Subject: [PATCH] fix bug --- service/controller/controller.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/service/controller/controller.go b/service/controller/controller.go index d0ec6b5..cd14f00 100644 --- a/service/controller/controller.go +++ b/service/controller/controller.go @@ -342,8 +342,9 @@ func compareUserList(old, new *[]api.UserInfo) (deleted, added []int) { } l := len(tmp) for i := range *new { - tmp[(*old)[i].GetUserEmail()] = struct{}{} - tmp2[(*new)[i].GetUserEmail()] = struct{}{} + e := (*new)[i].GetUserEmail() + tmp[e] = struct{}{} + tmp2[e] = struct{}{} if l != len(tmp) { added = append(added, i) l++