Skip to content

Commit c953de0

Browse files
author
José Valim
committed
Enforce atom keys for config
1 parent aad7aa4 commit c953de0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/elixir/lib/config.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ defmodule Config do
152152
153153
"""
154154
@doc since: "1.9.0"
155-
def config(root_key, key, opts) when is_atom(root_key) do
155+
def config(root_key, key, opts) when is_atom(root_key) and is_atom(key) do
156156
get_config!()
157157
|> __merge__([{root_key, [{key, opts}]}])
158158
|> put_config()

0 commit comments

Comments
 (0)