1 parent 9cedaec commit b23640bCopy full SHA for b23640b
1 file changed
lib/view_component/engine.rb
@@ -81,7 +81,11 @@ class Engine < Rails::Engine # :nodoc:
81
ActiveSupport.on_load(:after_initialize) do
82
if Rails.application.config.eager_load
83
ActiveSupport::Notifications.instrument("compile.view_component") do
84
- ViewComponent::Base.descendants.each(&:__vc_compile)
+ ViewComponent::Base.descendants.each do |component|
85
+ next unless component.name
86
+
87
+ component.__vc_compile
88
+ end
89
end
90
91
0 commit comments