Just return the value if it exists, otherwise return the default.

The guard here caused the ‘EXIT’ clause to be triggered in
`ejabberd_config:prepare_opt_val/4` on line 573 of
`ejabberd_config.erl`.
This commit is contained in:
Sonny Scroggin 2014-03-18 11:23:25 -05:00
parent 1ae6491e75
commit b194fd5c99
1 changed files with 1 additions and 1 deletions

View File

@ -111,7 +111,7 @@ try_get_option(Host, OptionName, DefaultValue) ->
true -> ok;
_ -> throw({module_must_be_started_in_vhost, ?MODULE, Host})
end,
gen_mod:get_module_opt(Host, ?MODULE, OptionName, fun(I) when I -> I end, DefaultValue).
gen_mod:get_module_opt(Host, ?MODULE, OptionName, fun(I) -> I end, DefaultValue).
get_option_access(Host) ->
try_get_option(Host, access_commands, []).