chore: avoid invalid dynamic call error

This commit is contained in:
Zaiming (Stone) Shi 2023-10-25 16:45:45 +02:00
parent ba2464769b
commit 8c30c22b02
1 changed files with 2 additions and 1 deletions

View File

@ -345,7 +345,8 @@ init_load(SchemaMod, Conf) when is_list(Conf) orelse is_binary(Conf) ->
upgrade_raw_conf(SchemaMod, RawConf) ->
case erlang:function_exported(SchemaMod, upgrade_raw_conf, 1) of
true ->
SchemaMod:upgrade_raw_conf(RawConf);
%% TODO make it a schema module behaviour in hocon_schema
apply(SchemaMod, upgrade_raw_conf, [RawConf]);
false ->
RawConf
end.