summaryrefslogtreecommitdiff
path: root/lib/banzai/reference_redactor.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/banzai/reference_redactor.rb')
-rw-r--r--lib/banzai/reference_redactor.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/banzai/reference_redactor.rb b/lib/banzai/reference_redactor.rb
index eb5c35da375..936436982e7 100644
--- a/lib/banzai/reference_redactor.rb
+++ b/lib/banzai/reference_redactor.rb
@@ -33,7 +33,7 @@ module Banzai
#
# data - An Array of a Hashes mapping an HTML document to nodes to redact.
def redact_document_nodes(all_document_nodes)
- all_nodes = all_document_nodes.map { |x| x[:nodes] }.flatten
+ all_nodes = all_document_nodes.flat_map { |x| x[:nodes] }
visible = nodes_visible_to_user(all_nodes)
metadata = []