Clone metadata with JSON conversion Fixes #4366

3c05fb145679fb1fcf098e14148835680ee61115

Cohee <18619528+Cohee1207@users.noreply.github.com>

1 files changed, +2 -1Ignore whitespace
public/scripts/group-chats.js+2 -1
@@ -1194,7 +1194,8 @@ export async function editGroup(id, immediately, reload = true) {
11941194 }
11951195
11961196 if (id === selected_group) {
1197- group['chat_metadata'] = structuredClone(chat_metadata);
1197+ // structuredClone may cause issues if metadata has non-cloneable references
1198+ group['chat_metadata'] = JSON.parse(JSON.stringify(chat_metadata));
11981199 }
11991200
12001201 if (immediately) {