developmentseed / jekyll-hook

No Longer Maintained | A server that listens for GitHub webhook posts and renders a Jekyll site
BSD 3-Clause "New" or "Revised" License
508 stars 83 forks source link

Fix crash if config doesn't have an email section #28

Closed cmrn closed 9 years ago

cmrn commented 9 years ago

The "email" section of config.json is marked in the documentation as optional, however jekyll-hook crashes if it can't find this section.

This change fixes that bug by checking if the section exists before accessing the email.isActivated value, rather than afterwards.

parkr commented 9 years ago

:+1: