fix: Replace toString check with a JSON check

- toString returns [object Object] which is not a very accurate check
This commit is contained in:
Faris Ansari 2019-01-26 00:49:52 +05:30
parent d8d141c7be
commit e4788cd570

View file

@ -33,10 +33,10 @@ frappe.ui.form.ControlSelect = frappe.ui.form.ControlData.extend({
}
// nothing changed
if(options.toString() === this.last_options) {
if (JSON.stringify(options) === this.last_options) {
return;
}
this.last_options = options.toString();
this.last_options = JSON.stringify(options);
if(this.$input) {
var selected = this.$input.find(":selected").val();