From 1a7b1c1386379f587b01b42f40c18c673f4cbda5 Mon Sep 17 00:00:00 2001 From: Mikael Svenson Date: Wed, 10 Oct 2018 10:40:26 +0200 Subject: [PATCH] Bug fix for parsing URL mp --- .../src/services/TemplateService/BaseTemplateService.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/react-search-refiners/src/services/TemplateService/BaseTemplateService.ts b/samples/react-search-refiners/src/services/TemplateService/BaseTemplateService.ts index 25ea9942a..6eeed62b7 100644 --- a/samples/react-search-refiners/src/services/TemplateService/BaseTemplateService.ts +++ b/samples/react-search-refiners/src/services/TemplateService/BaseTemplateService.ts @@ -176,7 +176,7 @@ abstract class BaseTemplateService { // Return the URL or Title part of a URL automatic managed property //

{{getDate MyLinkOWSURLH "Title"}}

Handlebars.registerHelper("getUrlField", (urlField: string, value: "URL" | "Title") => { - let separatorPos = urlField.lastIndexOf(","); + let separatorPos = urlField.indexOf(","); if (value === "URL") { return urlField.substr(0, separatorPos); }