Bug fix for parsing URL mp

This commit is contained in:
Mikael Svenson 2018-10-10 10:40:26 +02:00
parent 0d13a37dcd
commit 1a7b1c1386
1 changed files with 1 additions and 1 deletions

View File

@ -176,7 +176,7 @@ abstract class BaseTemplateService {
// Return the URL or Title part of a URL automatic managed property // Return the URL or Title part of a URL automatic managed property
// <p>{{getDate MyLinkOWSURLH "Title"}}</p> // <p>{{getDate MyLinkOWSURLH "Title"}}</p>
Handlebars.registerHelper("getUrlField", (urlField: string, value: "URL" | "Title") => { Handlebars.registerHelper("getUrlField", (urlField: string, value: "URL" | "Title") => {
let separatorPos = urlField.lastIndexOf(","); let separatorPos = urlField.indexOf(",");
if (value === "URL") { if (value === "URL") {
return urlField.substr(0, separatorPos); return urlField.substr(0, separatorPos);
} }