summaryrefslogtreecommitdiff
path: root/src/mustache.erl
diff options
context:
space:
mode:
Diffstat (limited to 'src/mustache.erl')
-rw-r--r--src/mustache.erl4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mustache.erl b/src/mustache.erl
index a713bd8..df81aed 100644
--- a/src/mustache.erl
+++ b/src/mustache.erl
@@ -171,13 +171,13 @@ get(Key, Ctx, Mod) ->
error ->
case erlang:function_exported(Mod, Key, 1) of
true ->
- Val = to_s(apply(Mod, Key, [Ctx])),
+ Val = to_s(Mod:Key(Ctx)),
% io:format("From Mod/1 {~p, ~p}~n", [Key, Val]),
Val;
false ->
case erlang:function_exported(Mod, Key, 0) of
true ->
- Val = to_s(apply(Mod, Key, [])),
+ Val = to_s(Mod:Key()),
% io:format("From Mod/0 {~p, ~p}~n", [Key, Val]),
Val;
false ->