File tree Expand file tree Collapse file tree 1 file changed +14
-11
lines changed Expand file tree Collapse file tree 1 file changed +14
-11
lines changed Original file line number Diff line number Diff line change @@ -305,17 +305,20 @@ export const Settings = () => {
305
305
const createSingleArrayForPolicy : any = [ ] ;
306
306
policies . map ( ( aControl : any ) => {
307
307
const cSingleAccessArray = aControl . allGroups ? aControl . allGroups : [ ] ;
308
- aControl . rules [ 0 ] . destinations . forEach ( ( destination : any ) => {
309
- if ( cSingleAccessArray . indexOf ( destination . id ) === - 1 ) {
310
- cSingleAccessArray . push ( destination . id ) ;
311
- }
312
- } ) ;
313
-
314
- aControl . rules [ 0 ] . sources . forEach ( ( source : any ) => {
315
- if ( cSingleAccessArray . indexOf ( source . id ) === - 1 ) {
316
- cSingleAccessArray . push ( source . id ) ;
317
- }
318
- } ) ;
308
+ if ( aControl . rules [ 0 ] . destinations ) {
309
+ aControl . rules [ 0 ] . destinations . forEach ( ( destination : any ) => {
310
+ if ( cSingleAccessArray . indexOf ( destination . id ) === - 1 ) {
311
+ cSingleAccessArray . push ( destination . id ) ;
312
+ }
313
+ } ) ;
314
+ }
315
+ if ( aControl . rules [ 0 ] . sources ) {
316
+ aControl . rules [ 0 ] . sources . forEach ( ( source : any ) => {
317
+ if ( cSingleAccessArray . indexOf ( source . id ) === - 1 ) {
318
+ cSingleAccessArray . push ( source . id ) ;
319
+ }
320
+ } ) ;
321
+ }
319
322
320
323
aControl [ "cSingleAccessArray" ] = cSingleAccessArray ;
321
324
createSingleArrayForPolicy . push ( aControl ) ;
You can’t perform that action at this time.
0 commit comments