Skip to content

Commit bd43ed4

Browse files
committed
Refactor if statement
1 parent 402e3d3 commit bd43ed4

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

lib/plausible_web/controllers/api/external_controller.ex

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -168,11 +168,7 @@ defmodule PlausibleWeb.Api.ExternalController do
168168
defp is_bot?(%UAInspector.Result.Bot{}), do: true
169169

170170
defp is_bot?(%UAInspector.Result{client: %UAInspector.Result.Client{name: "Headless Chrome"}}) do
171-
if Application.get_env(:plausible, :system_environment) in ["staging", "rc"] do
172-
false
173-
else
174-
true
175-
end
171+
Application.get_env(:plausible, :system_environment) not in ["staging", "rc"]
176172
end
177173

178174
defp is_bot?(_), do: false

0 commit comments

Comments
 (0)