diff options
author | Stan Hu <stanhu@gmail.com> | 2017-04-15 16:04:15 +0300 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2017-04-15 17:26:32 +0300 |
commit | e89d4741d38bdbb645d5bf92cfdac5d66e8438b0 (patch) | |
tree | 2550fc740433071ebb3fd71a850096efa045063b /lib | |
parent | 309bab431075eabfb7a01300f946ce9eb5b6fb98 (diff) |
Fix regression in rendering Markdown references that do not exist
Closes #30972
Diffstat (limited to 'lib')
-rw-r--r-- | lib/banzai/reference_parser/base_parser.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/banzai/reference_parser/base_parser.rb b/lib/banzai/reference_parser/base_parser.rb index dabf71d6aeb..c2503fa2adc 100644 --- a/lib/banzai/reference_parser/base_parser.rb +++ b/lib/banzai/reference_parser/base_parser.rb @@ -136,7 +136,8 @@ module Banzai nodes.each_with_object({}) do |node, hash| if node.has_attribute?(attribute) - hash[node] = objects_by_id[node.attr(attribute).to_i] + obj = objects_by_id[node.attr(attribute).to_i] + hash[node] = obj if obj end end end |