Skip to content

Commit 30cd8fc

Browse files
authored
Merge pull request #720 from mathias234/remove-compact
Remove compact call on locals in broadcast_rendering_with_defaults
2 parents 4bf3c0b + 65afc97 commit 30cd8fc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/models/concerns/turbo/broadcastable.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -518,7 +518,7 @@ def broadcast_rendering_with_defaults(options)
518518
options.tap do |o|
519519
# Add the current instance into the locals with the element name (which is the un-namespaced name)
520520
# as the key. This parallels how the ActionView::ObjectRenderer would create a local variable.
521-
o[:locals] = (o[:locals] || {}).reverse_merge(model_name.element.to_sym => self).compact
521+
o[:locals] = (o[:locals] || {}).reverse_merge(model_name.element.to_sym => self)
522522

523523
if o[:html] || o[:partial]
524524
return o

0 commit comments

Comments
 (0)