fix: bom creator tree view not working (#24200)

This commit is contained in:
rohitwaghchaure 2024-01-09 10:17:29 +05:30 committed by GitHub
parent eb1da4ad18
commit c56c1cc2f7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -200,9 +200,13 @@ frappe.views.TreeView = class TreeView {
if (use_value == null) {
use_value = use_label;
}
this.args["include_disabled"] = this.page.inner_toolbar
.find("input[type='checkbox']")
.prop("checked");
if (this.page?.inner_toolbar) {
this.args["include_disabled"] = this.page.inner_toolbar
.find("input[type='checkbox']")
.prop("checked");
}
this.tree = new frappe.ui.Tree({
parent: this.body,
label: use_label,