From 13803b0195cc6c111fcdc88d8e1ee0ac4abdc0d1 Mon Sep 17 00:00:00 2001 From: WolverinDEV Date: Sat, 12 Dec 2020 14:07:51 +0100 Subject: [PATCH] Improved channel update performance --- shared/js/tree/Channel.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/shared/js/tree/Channel.ts b/shared/js/tree/Channel.ts index 19371a97..f6a4e78d 100644 --- a/shared/js/tree/Channel.ts +++ b/shared/js/tree/Channel.ts @@ -572,10 +572,13 @@ export class ChannelEntry extends ChannelTreeEntry { /* TODO: Validate values. Example: channel_conversation_mode */ - for(let variable of variables) { + for(const variable of variables) { let key = variable.key; let value = variable.value; - JSON.map_field_to(this.properties, value, variable.key); + if(!JSON.map_field_to(this.properties, value, variable.key)) { + /* no update */ + continue; + } if(key == "channel_name") { this.parsed_channel_name = new ParsedChannelName(value, this.hasParent());