1
0
Fork 0
mirror of https://github.com/middleman/middleman.git synced 2022-11-09 12:20:27 -05:00

avoid warning with empty frontmatter

This commit is contained in:
Thomas Reynolds 2013-04-14 09:29:34 -07:00
parent 31651e4296
commit ca333bb306

View file

@ -97,7 +97,8 @@ module Middleman::CoreExtensions
content = content.sub(yaml_regex, "")
begin
data = YAML.load($1).symbolize_keys
data = YAML.load($1) || {}
data = data.symbolize_keys
rescue *YAML_ERRORS => e
logger.error "YAML Exception: #{e.message}"
return false