fix: check if get_route property exists before calling (#34526)

This commit is contained in:
Hussain Nagaria 2025-10-29 17:21:17 +05:30 committed by GitHub
parent 3329b6a46c
commit c1a58bc559
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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;
}