Skip to content

Commit

Permalink
fix: dont set fetch from if partial
Browse files Browse the repository at this point in the history
  • Loading branch information
ankush committed Mar 7, 2024
1 parent b525251 commit 26cf1c8
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,11 @@ watch(
watch([() => doctype.value, () => fieldname.value], ([doctype_value, fieldname_value]) => {
let [doctype_name, field_name] = props.value?.split(".") || ["", ""];
if (doctype_value != doctype_name || fieldname_value != field_name) {
emit("update:modelValue", `${doctype_value}.${fieldname_value}`);
let fetch_expression = "";
if (doctype_value && fieldname_value) {
fetch_expression = `${doctype_value}.${fieldname_value}`;
}
emit("update:modelValue", fetch_expression);
}
});
</script>
Expand Down

0 comments on commit 26cf1c8

Please sign in to comment.