fix: check if get_route property exists before calling (#34526)
This commit is contained in:
parent
3329b6a46c
commit
c1a58bc559
1 changed files with 1 additions and 1 deletions
|
|
@ -282,7 +282,7 @@ frappe.ui.Dialog = class Dialog extends frappe.ui.FieldGroup {
|
|||
|
||||
handle_focus() {
|
||||
const me = this;
|
||||
if (frappe.get_route()) {
|
||||
if (frappe.get_route?.()) {
|
||||
if (frappe.get_route()[0] == "Form") {
|
||||
if (!me.last_focus) me.last_focus = document.activeElement;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue