From 7c902cfadff18e93d181d3b4c0e91b68316104f4 Mon Sep 17 00:00:00 2001 From: kballou Date: Tue, 22 Mar 2016 15:16:51 -0600 Subject: Add guard to series function This function will not work down the chain unless this parameter is a list, this will make sure that it comes in as a list (or will match error) --- lib/ex_prometheus_io.ex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ex_prometheus_io.ex b/lib/ex_prometheus_io.ex index dd47bee..43604ea 100644 --- a/lib/ex_prometheus_io.ex +++ b/lib/ex_prometheus_io.ex @@ -15,7 +15,7 @@ defmodule ExPrometheusIo do spawn_query(:range, query_opts) end - def series(matches, _opts \\ []) do + def series(matches, _opts \\ []) when is_list(matches) do spawn_query(:series, [matches]) end -- cgit v1.2.1