Software /
code /
prosody
Changeset
3139:7b4f180d7c6f
util.filters: Don't traceback with no filters of a type added
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Wed, 02 Jun 2010 13:03:55 +0100 |
parents | 3138:d6151c9a6f7e |
children | 3140:8c6ed6fd2d35 |
files | util/filters.lua |
diffstat | 1 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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