Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Fix: `@component_wrapper_used` should be set on component and not target

Aaron Contreras9d635b12b1d0
diff --git a/app/components/concerns/op_turbo/streamable.rb b/app/components/concerns/op_turbo/streamable.rb
index 48b45ecf11a..d3e506a461d 100644
--- a/app/components/concerns/op_turbo/streamable.rb
+++ b/app/components/concerns/op_turbo/streamable.rb
@@ -66,7 +66,7 @@ module OpTurbo
def insert_as_turbo_stream(component:, view_context:, action: :append)
template = component.render_in(view_context)
- unless @component_wrapper_used
+ unless component.instance_variable_get(:@component_wrapper_used)
raise "You need to wrap your component in a `component_wrapper` block in order to use the turbo-stream methods"
end