Avoid exception when there is no label template.

This commit is contained in:
Nicholas-Westby
2017-09-07 08:30:09 -07:00
parent d46d64c52b
commit fa265d3019
+2 -2
View File
@@ -421,7 +421,7 @@ angular.module('umbraco.services').factory('archetypeLabelService', function (ar
getFieldsetTitle: function(scope, fieldsetConfigModel, fieldsetIndex) {
if(!fieldsetConfigModel)
return "";
return $q.when("");
var fieldset = scope.model.value.fieldsets[fieldsetIndex];
var fieldsetConfig = scope.getConfigFieldsetByAlias(fieldset.alias);
@@ -429,7 +429,7 @@ angular.module('umbraco.services').factory('archetypeLabelService', function (ar
var promises = [];
if (template.length < 1)
return fieldsetConfig.label;
return $q.when(fieldsetConfig.label);
var rgx = /{{.*?}}/g;
var matches = splitByRegex(rgx, template);