Skip to content

Commit

Permalink
perf: skip network call if no doc (#23967)
Browse files Browse the repository at this point in the history
If link field has no value then its title will always be undefined.

(cherry picked from commit 6367194)
  • Loading branch information
ankush authored and mergify[bot] committed Dec 27, 2023
1 parent 6a5b8d0 commit 4574af6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions frappe/public/js/frappe/utils/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -1553,6 +1553,9 @@ Object.assign(frappe.utils, {
},

fetch_link_title(doctype, name) {
if (!doctype || !name) {
return;
}
try {
return frappe
.xcall("frappe.desk.search.get_link_title", {
Expand Down

0 comments on commit 4574af6

Please sign in to comment.