mirror of https://github.com/zulip/zulip.git
settings_components: Compare group setting values correctly.
Since group setting value can be an object containing direct_members and direct_subgroups fields, this code updates check_group_property_changed function to use isEqual to compare the setting values instead of using "===". This makes sure that save-discard widget is shown and hidden as expected.
This commit is contained in:
parent
5a55735ecb
commit
d7ad951172
|
@ -1,4 +1,5 @@
|
|||
import $ from "jquery";
|
||||
import _ from "lodash";
|
||||
import assert from "minimalistic-assert";
|
||||
import * as tippy from "tippy.js";
|
||||
import {z} from "zod";
|
||||
|
@ -934,7 +935,7 @@ export function check_group_property_changed(elem: HTMLElement, group: UserGroup
|
|||
blueslip.error("Element refers to unknown property", {property_name});
|
||||
}
|
||||
}
|
||||
return current_val !== proposed_val;
|
||||
return !_.isEqual(current_val, proposed_val);
|
||||
}
|
||||
|
||||
export function check_custom_profile_property_changed(
|
||||
|
|
Loading…
Reference in New Issue