KEYCLOAK-7634: Export error on client if no mappers

This commit is contained in:
ssilvert@win.redhat.com 2018-07-02 16:26:00 -04:00 committed by Marek Posolda
parent d99dca2db3
commit 65551159e0

View file

@ -778,8 +778,10 @@ module.controller('ClientListCtrl', function($scope, realm, Client, serverInfo,
var clientCopy = angular.copy(client);
delete clientCopy.id;
for (var i = 0; i < clientCopy.protocolMappers.length; i++) {
delete clientCopy.protocolMappers[i].id;
if (clientCopy.protocolMappers) {
for (var i = 0; i < clientCopy.protocolMappers.length; i++) {
delete clientCopy.protocolMappers[i].id;
}
}
saveAs(new Blob([angular.toJson(clientCopy, 4)], { type: 'application/json' }), clientCopy.clientId + '.json');