From 652f8112d274a0ef1002d25d828d7781ee83650a Mon Sep 17 00:00:00 2001 From: Ben Halpern Date: Mon, 30 Nov 2020 10:03:06 -0500 Subject: [PATCH] Small optimization: Don't include --active variation on button for non-logged-in (#11676) --- app/views/articles/_reaction_button.html.erb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/views/articles/_reaction_button.html.erb b/app/views/articles/_reaction_button.html.erb index 4f4426d5d..8cd564cca 100644 --- a/app/views/articles/_reaction_button.html.erb +++ b/app/views/articles/_reaction_button.html.erb @@ -7,8 +7,10 @@ <%= inline_svg_tag(image_path, aria: true, class: "crayons-icon", title: description) %> + <% if user_signed_in? # We cannot trigger the action state unless the user is signed in, so no need to render. %> <%= inline_svg_tag(image_active_path, aria: true, class: "crayons-icon", title: description) %> + <% end %>