Skip to content

Commit 8621bb1

Browse files
fix(endpoint-syndicate): don’t add syndicated url if no value returned from syndicator
1 parent e70b9a7 commit 8621bb1

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

packages/endpoint-syndicate/lib/utils.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,13 @@ export const syndicateToTargets = async (publication, properties) => {
8787
try {
8888
const syndicatedUrl = await target.syndicate(properties, publication);
8989

90-
// Add syndicated URL to list of syndicated URLs
91-
syndicatedUrls.push(syndicatedUrl);
90+
if (syndicatedUrl) {
91+
// Add syndicated URL to list of syndicated URLs
92+
syndicatedUrls.push(syndicatedUrl);
93+
} else {
94+
// Add failed syndication target to list of failed targets
95+
failedTargets.push(target.info.uid);
96+
}
9297
} catch (error) {
9398
// Add failed syndication target to list of failed targets
9499
failedTargets.push(target.info.uid);

0 commit comments

Comments
 (0)