diff --git a/lib/step_flow/configuration.ex b/lib/step_flow/configuration.ex index ea0fc6e..0e8b726 100644 --- a/lib/step_flow/configuration.ex +++ b/lib/step_flow/configuration.ex @@ -4,10 +4,14 @@ defmodule StepFlow.Configuration do def get_var_value(module, key, default \\ nil) do conf_module = Application.get_env(:step_flow, module) - case Keyword.get(conf_module, key) do - {:system, variable} -> System.get_env(variable) - nil -> default - value -> value + if conf_module != nil do + case Keyword.get(conf_module, key) do + {:system, variable} -> System.get_env(variable) + nil -> default + value -> value + end + else + default end end