浏览代码

chore: fix typos

Zaiming (Stone) Shi 3 年之前
父节点
当前提交
efda516125
共有 1 个文件被更改,包括 4 次插入4 次删除
  1. 4 4
      apps/emqx/src/emqx_hocon.erl

+ 4 - 4
apps/emqx/src/emqx_hocon.erl

@@ -61,12 +61,12 @@ format_error(X) ->
     format_error(X, #{}).
     format_error(X, #{}).
 
 
 format_error({_Schema, [#{kind := K} = First | Rest] = All}, Opts) when
 format_error({_Schema, [#{kind := K} = First | Rest] = All}, Opts) when
-    K =:= validation_erorr orelse K =:= translation_error
+    K =:= validation_error orelse K =:= translation_error
 ->
 ->
     Update =
     Update =
-        case maps:get(no_stracktrace, Opts) of
+        case maps:get(no_stacktrace, Opts, false) of
             true ->
             true ->
-                fun no_stracktrace/1;
+                fun no_stacktrace/1;
             false ->
             false ->
                 fun(X) -> X end
                 fun(X) -> X end
         end,
         end,
@@ -84,5 +84,5 @@ iol(B) when is_binary(B) -> B;
 iol(A) when is_atom(A) -> atom_to_binary(A, utf8);
 iol(A) when is_atom(A) -> atom_to_binary(A, utf8);
 iol(L) when is_list(L) -> L.
 iol(L) when is_list(L) -> L.
 
 
-no_stracktrace(Map) ->
+no_stacktrace(Map) ->
     maps:without([stacktrace], Map).
     maps:without([stacktrace], Map).