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:
Sahil Batra 2024-10-11 18:53:11 +05:30 committed by Tim Abbott
parent 5a55735ecb
commit d7ad951172
1 changed files with 2 additions and 1 deletions

View File

@ -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(