Allow for other data types to be used with label template functions.
This commit is contained in:
@@ -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;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user