Wed, 02 Jun 2010 13:03:55 +0100
util.filters: Don't traceback with no filters of a type added
util/filters.lua | file | annotate | diff | comparison | revisions |
--- a/util/filters.lua Wed Jun 02 17:25:01 2010 +0500 +++ b/util/filters.lua Wed Jun 02 13:03:55 2010 +0100 @@ -16,8 +16,10 @@ function session.filter(type, data) local filter_list = filters[type]; - for i = 1, #filter_list do - data = filter_list[i](data); + if filter_list then + for i = 1, #filter_list do + data = filter_list[i](data); + end end return data; end