fix(workspace): Setup Dynamic Link if value exists (#20402)

This commit is contained in:
gavin 2023-03-20 20:44:32 +05:30 committed by GitHub
parent 6c6a89bcdd
commit eeeaedac65
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -382,8 +382,8 @@ class ShortcutDialog extends WidgetDialog {
reqd: 1,
options: "type",
onchange: () => {
if (this.dialog.get_value("type") == "DocType") {
let doctype = this.dialog.get_value("link_to");
const doctype = this.dialog.get_value("link_to");
if (doctype && this.dialog.get_value("type") == "DocType") {
frappe.model.with_doctype(doctype, () => {
let meta = frappe.get_meta(doctype);