File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -60,11 +60,7 @@ def default_render
60
60
end
61
61
62
62
def shared_data
63
- # Theses variables are set in the before_action, but we need to ensure they are initialized when using renderer alone
64
- @_inertia_shared_plain_data ||= { }
65
- @_inertia_shared_blocks ||= [ ]
66
-
67
- @_inertia_shared_plain_data . merge ( evaluated_blocks )
63
+ ( @_inertia_shared_plain_data || { } ) . merge ( evaluated_blocks )
68
64
end
69
65
70
66
def redirect_to ( options = { } , response_options = { } )
@@ -108,7 +104,7 @@ def capture_inertia_errors(options)
108
104
end
109
105
110
106
def evaluated_blocks
111
- @_inertia_shared_blocks & .map { |block | instance_exec ( &block ) } & .reduce ( &:merge ) || { }
107
+ ( @_inertia_shared_blocks || [ ] ) . map { |block | instance_exec ( &block ) } . reduce ( &:merge ) || { }
112
108
end
113
109
end
114
110
end
You can’t perform that action at this time.
0 commit comments