Permalink
Browse files

Make get_property act more like proplists:get_value

  • Loading branch information...
1 parent 0cd20ed commit 10b8387b0542711f1b73d2bf32d865cba9360982 @Vagabond Vagabond committed Jun 9, 2011
Showing with 6 additions and 2 deletions.
  1. +6 −2 src/vclock.erl
View
@@ -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

0 comments on commit 10b8387

Please sign in to comment.