Merge pull request #266 from hocsinhgioitoan/main

fix(ClientUserSettingManager): data.guild_positions return undefined
This commit is contained in:
Cinnamon 2022-08-20 18:05:07 +07:00 committed by GitHub
commit 3ec6bf45fb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -85,7 +85,7 @@
"eslint": "^8.22.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-import": "^2.25.3",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-prettier": "^4.2.1",
"husky": "^7.0.4",
"is-ci": "^3.0.1",
"jest": "^28.1.3",

View File

@ -210,7 +210,7 @@ class ClientUserSettingManager extends BaseManager {
mutual_guilds: data.friend_source_flags.all ? true : data.friend_source_flags.mutual_guilds,
};
}
if ('guild_folders' in data) {
if ('guild_folders' in data && 'guild_positions' in data) {
const data_ = data.guild_positions.map((guildId, i) => {
// Find folder
const folderIndex = data.guild_folders.findIndex(obj => obj.guild_ids.includes(guildId));