Merge pull request #28177 from frappe/f-191

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:47:46 +05:30 committed by GitHub
commit 02dbef6ceb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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();
}
}