fix: previously opened doc values showing up on other docs when phone field is empty

This commit is contained in:
Sumit Bhanushali 2024-10-19 17:32:54 +05:30
parent 7348572af8
commit 7ecafcf6e2

View file

@ -129,8 +129,9 @@ frappe.ui.form.ControlPhone = class ControlPhone extends frappe.ui.form.ControlD
refresh() {
super.refresh();
// Previously opened doc values showing up on a new doc
// Previously opened doc values showing up on other docs where phone fields is empty
if (this.frm && this.frm.doc.__islocal && !this.get_value()) {
if (!this.get_value()) {
this.reset_input();
}
}