Browse Source

fix build

5HT 5 years ago
parent
commit
d5d7ffeaff
2 changed files with 2 additions and 2 deletions
  1. 1 1
      include/api.hrl
  2. 1 1
      src/kvs.erl

+ 1 - 1
include/api.hrl

@@ -14,5 +14,5 @@
 -spec modules() -> list(atom()).
 -spec cursors() -> list({atom(),list(atom())}).
 -spec tables() -> list(#table{}).
--spec table(Tab :: atom()) -> #table{}.
+-spec table(Tab :: atom()) -> #table{} | false.
 -endif.

+ 1 - 1
src/kvs.erl

@@ -22,7 +22,7 @@ start(_,_) -> supervisor:start_link({local, kvs}, kvs, []).
 stop(_) -> ok.
 test_tabs() -> [ #table{name='$msg', fields=record_info(fields,'$msg')} ].
 
-fields(Table) ->
+fields(Table) when is_atom(Table) ->
   case table(Table) of
     false -> [];
     T -> T#table.fields