V8: Fix JS error when using the hide search function in treepicker (#6931)
* Fix JS error when using the hide search function in treepicker * updates with same defensive change from original pr - only explores child.children after confirming the child indeed has children Co-authored-by: Nathan Woulfe <nathan@nathanw.com.au>
This commit is contained in:
@@ -574,6 +574,8 @@ angular.module("umbraco").controller("Umbraco.Editors.TreePickerController",
|
||||
var listViewResults = vm.searchInfo.selectedSearchResults.filter(i => i.parentId === child.id);
|
||||
|
||||
listViewResults.forEach(item => {
|
||||
if (!child.children) return;
|
||||
|
||||
var childExists = child.children.find(c => c.id === item.id);
|
||||
|
||||
if (!childExists) {
|
||||
|
||||
Reference in New Issue
Block a user