fix: Do not re-use call popup if call ID is different

This commit is contained in:
Suraj Shetty 2021-02-08 18:50:05 +05:30
parent ba26020a82
commit c5248b30eb

View File

@ -191,11 +191,12 @@ class CallPopup {
$(document).on('app_ready', function () {
frappe.realtime.on('show_call_popup', call_log => {
if (!erpnext.call_popup) {
let call_popup = erpnext.call_popup;
if (call_popup && call_log.name === call_popup.call_log.name) {
erpnext.call_popup = new CallPopup(call_log);
} else {
erpnext.call_popup.update_call_log(call_log);
erpnext.call_popup.dialog.show();
call_popup.update_call_log(call_log);
call_popup.dialog.show();
}
});
});