Add clone of list objects for each state definition

This commit is contained in:
gconsidine 2017-07-19 12:55:01 -04:00
parent 1d3d6be029
commit cb860261fe
2 changed files with 3 additions and 4 deletions

View File

@ -18,8 +18,6 @@ function LegacyCredentialsService (pathService) {
},
'list@credentials': {
templateProvider: function(CredentialList, generateList) {
CredentialList.iterator = 'credential';
let html = generateList.build({
list: CredentialList,
mode: 'edit'

View File

@ -738,8 +738,9 @@ function($injector, $stateExtender, $log, i18n) {
},
resolve: {
ListDefinition: [field.list, function(list) {
list.iterator = field.sourceModel;
return list;
let listClone = _.cloneDeep(list);
listClone.iterator = field.sourceModel;
return listClone;
}],
OrganizationId: ['ListDefinition', 'InventoriesService', '$stateParams', '$rootScope',
function(list, InventoriesService, $stateParams, $rootScope){