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:
parent
31651e4296
commit
ca333bb306
1 changed files with 2 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue