From b9dca2cf2a3465dbef4f358a15cb58e3332058dc Mon Sep 17 00:00:00 2001 From: Dragory <2606411+Dragory@users.noreply.github.com> Date: Thu, 19 Aug 2021 01:22:42 +0300 Subject: [PATCH] Hotfix error in role restore --- backend/src/plugins/Persist/events/LoadDataEvt.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/plugins/Persist/events/LoadDataEvt.ts b/backend/src/plugins/Persist/events/LoadDataEvt.ts index 63569679..4d2becb4 100644 --- a/backend/src/plugins/Persist/events/LoadDataEvt.ts +++ b/backend/src/plugins/Persist/events/LoadDataEvt.ts @@ -61,7 +61,7 @@ export const LoadDataEvt = persistEvt({ if (rolesToRestore.length) { restoredData.push("roles"); - toRestore.roles = Array.from(new Set([...rolesToRestore, ...member.roles.cache])); + toRestore.roles = Array.from(new Set([...rolesToRestore, ...member.roles.cache.keys()])); } }