Allow for other data types to be used with label template functions.

This commit is contained in:
Nicholas-Westby
2017-09-06 08:18:43 -07:00
parent 45318cf061
commit d46d64c52b
+6 -1
View File
@@ -38,7 +38,7 @@ angular.module('umbraco.services').factory('archetypeLabelService', function (ar
labelValue = "";
}
// Check the type of value (may be a string or a promise).
// Check the type of value (may be a string, promise, function, or other).
if (isString(labelValue)) {
// handle collapsing dollar signs in labels (#387)
@@ -71,6 +71,11 @@ angular.module('umbraco.services').factory('archetypeLabelService', function (ar
// function would be pretty strange, though I see no reason to disallow it).
processLabelValue(labelValue, promises, match);
} else {
// Some other data type (e.g., number, date, object).
match.value = labelValue;
}
}