fix(Link): improve logic for early exit
This commit is contained in:
parent
e3e5b6616a
commit
da4c31b60c
1 changed files with 1 additions and 3 deletions
|
|
@ -6,7 +6,6 @@
|
|||
// add_fetches
|
||||
import Awesomplete from "awesomplete";
|
||||
frappe.ui.form.recent_link_validations = {};
|
||||
const SPECIAL_VALUES = ["create_new__link_option", "advanced_search__link_option"];
|
||||
|
||||
frappe.ui.form.ControlLink = class ControlLink extends frappe.ui.form.ControlData {
|
||||
static trigger_change_on_input_event = false;
|
||||
|
|
@ -674,8 +673,7 @@ frappe.ui.form.ControlLink = class ControlLink extends frappe.ui.form.ControlDat
|
|||
if (
|
||||
nothing_to_fetch &&
|
||||
value &&
|
||||
!SPECIAL_VALUES.includes(value) &&
|
||||
this.awesomplete.get_item(value)
|
||||
this.awesomplete._list?.find((item) => item.value === value && !item.action)
|
||||
) {
|
||||
// if value is in the suggestion list, must be correct
|
||||
return value;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue