Skip to content
This repository has been archived by the owner on Jun 9, 2022. It is now read-only.

Only generate audio for items with content. #10

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

seanmtracey
Copy link
Contributor

Will throw if content for a passed UUID is empty. The promises resolve as null, which are then filtered from the array of otherwise valid items.

} );
return Promise.all(promises);
})
.then( items => filterNullItems(items) )
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not inline?
.then( items => { return items.filter( item => {return item != null; ) )

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like to modularise these snippets. Saves us having to change code in multiple places if we want to filter by a different condition.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants