avoid warning with empty frontmatter
This commit is contained in:
parent
31651e4296
commit
ca333bb306
|
@ -97,7 +97,8 @@ module Middleman::CoreExtensions
|
||||||
content = content.sub(yaml_regex, "")
|
content = content.sub(yaml_regex, "")
|
||||||
|
|
||||||
begin
|
begin
|
||||||
data = YAML.load($1).symbolize_keys
|
data = YAML.load($1) || {}
|
||||||
|
data = data.symbolize_keys
|
||||||
rescue *YAML_ERRORS => e
|
rescue *YAML_ERRORS => e
|
||||||
logger.error "YAML Exception: #{e.message}"
|
logger.error "YAML Exception: #{e.message}"
|
||||||
return false
|
return false
|
||||||
|
|
Loading…
Reference in a new issue