From 4f3191fabef6821d1646ea87eb308d3bfcdcf6c9 Mon Sep 17 00:00:00 2001 From: mcl-sz Date: Tue, 2 Feb 2021 00:33:31 +0100 Subject: [PATCH] Fix for applying searchResultFormatter on found searchresults (#9738) * Fix for applying searchResultFormatter on found searchresults We found out that when the searchbox in the linkpicker is used, the URL of a page is not being shown anymore since Umbraco 8.7 and later. This is because of the searchResultFormatter wasn't applied correct. * Changed ES6 arrow syntax as with the other functions. Changed ES6 arrow syntax as with the other functions. * Changed single qoutes to double qoutes for type --- .../src/common/services/search.service.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Umbraco.Web.UI.Client/src/common/services/search.service.js b/src/Umbraco.Web.UI.Client/src/common/services/search.service.js index 8e9525af84..eda36a5fce 100644 --- a/src/Umbraco.Web.UI.Client/src/common/services/search.service.js +++ b/src/Umbraco.Web.UI.Client/src/common/services/search.service.js @@ -67,10 +67,11 @@ angular.module('umbraco.services') } return entityResource.search(args.term, "Document", args.searchFrom, args.canceler, args.dataTypeKey) - _.each(data, function (item) { + .then(data => { data.forEach(item => searchResultFormatter.configureContentResult(item)); return data; }); + }, /**