Skip to content

Commit df5e018

Browse files
myabcCopilot
andauthored
Respect silence_deprecations? when warning
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 2554e2b commit df5e018

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

app/components/primer/open_project/border_box/collapsible_header.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,9 @@ def render?
113113
end
114114

115115
def deprecation_warn(message)
116-
::Primer::ViewComponents.deprecation.warn(message) if !Rails.env.production?
116+
return if Rails.env.production? || silence_deprecations?
117+
118+
::Primer::ViewComponents.deprecation.warn(message)
117119
end
118120
end
119121
end

0 commit comments

Comments
 (0)