Bug fix for parsing URL mp
This commit is contained in:
parent
0d13a37dcd
commit
1a7b1c1386
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue