Skip to content

Open source, privacy-first web analytics. Lightweight, cookie-free Google Analytics alternative. Self-hosted or cloud.

Fix get_root_domain for "(none)"

Uku Taht999a477b5daf
diff --git a/lib/plausible_web/controllers/api/external_controller.ex b/lib/plausible_web/controllers/api/external_controller.ex
index 02e664de2f..2c5af048c3 100644
--- a/lib/plausible_web/controllers/api/external_controller.ex
+++ b/lib/plausible_web/controllers/api/external_controller.ex
@@ -202,6 +202,7 @@ defmodule PlausibleWeb.Api.ExternalController do
end
end
+ defp get_root_domain("(none)"), do: "(none)"
defp get_root_domain(hostname) when is_binary(hostname) do
PublicSuffix.registrable_domain(hostname)
end