Skip to content

Commit

Permalink
#1052: filter automation null entries after connection issues
Browse files Browse the repository at this point in the history
  • Loading branch information
JoernBerkefeld committed Jul 25, 2023
1 parent d705672 commit 381270e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/metadataTypes/Automation.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,9 @@ class Automation extends MetadataType {
})
)
: [];
let metadataMap = this.parseResponseBody({ items: details });

// * if retrieving some automations fails, a null element would remain in the details-array for each of them that needs to be filtered to prevent it from causing issues elsewhere
let metadataMap = this.parseResponseBody({ items: details.filter(Boolean) });

if (Object.keys(metadataMap).length) {
// attach notification information to each automation that has any
Expand Down

0 comments on commit 381270e

Please sign in to comment.