ActiveCampaign / postmark-cli

The official CLI tool for Postmark
https://postmarkapp.com
MIT License
79 stars 9 forks source link

Prevent TypeError from `null` TextBody when pulling templates #69

Closed derekrushforth closed 1 year ago

derekrushforth commented 1 year ago

Hey @tomek-ac,

On some templates, Postmark's API returns a null value on the TextBody if there's no content. It should return an empty string, so I'll report this to the backend team. This occasionally causes a type error when running postmark templates pull, so I've updated the conditional here to check this before saving the text version.

Related: #48