Skip to content

Commit

Permalink
Rescue from component error
Browse files Browse the repository at this point in the history
  • Loading branch information
jaredcwhite committed Apr 13, 2024
1 parent e677a05 commit ec0d3cf
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,11 @@ def locate_resource_layouts_and_partials_for_fash_refresh(path, layouts_to_reloa
end
end

def locate_components_for_fast_refresh(path)
def locate_components_for_fast_refresh(path) # rubocop:todo Metrics/AbcSize
comp = Bridgetown::Component.subclasses.find do |item|
item.component_template_path == path || item.source_location == path
rescue StandardError
Bridgetown.logger.debug "Fast refresh:", "couldn't locate component for #{path}"
end
return unless comp

Expand Down

0 comments on commit ec0d3cf

Please sign in to comment.