Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Make get_property act more like proplists:get_value

  • Loading branch information...
commit 10b8387b0542711f1b73d2bf32d865cba9360982 1 parent 0cd20ed
@Vagabond Vagabond authored
Showing with 6 additions and 2 deletions.
  1. +6 −2 src/vclock.erl
View
8 src/vclock.erl
@@ -187,8 +187,12 @@ prune_vclock1(V,Now,BProps,HeadTime) ->
end.
get_property(Key, PairList) ->
- {_Key, Value} = lists:keyfind(Key, 1, PairList),
- Value.
+ case lists:keyfind(Key, 1, PairList) of
+ {_Key, Value} ->
+ Value;
+ false ->
+ undefined
+ end.
%% ===================================================================
%% EUnit tests
Please sign in to comment.
Something went wrong with that request. Please try again.