Skip to content

Commit

Permalink
remove unnecessary inspect
Browse files Browse the repository at this point in the history
  • Loading branch information
joelhawksley committed Aug 27, 2024
1 parent 955a52e commit 6fb636a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/view_component/compiler.rb
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ def template_errors
errors << "Couldn't find a template file or inline render method for #{component_class}."
end

if templates.map { |template| "#{template[:variant].inspect}_#{template[:format]}" }.tally.any? { |_, count| count > 1 }
if templates.map { |template| "#{template[:variant]}_#{template[:format]}" }.tally.any? { |_, count| count > 1 }
errors <<
"More than one template found for #{component_class}. " \
"There can only be one default template file per component."
Expand Down

0 comments on commit 6fb636a

Please sign in to comment.