diff options
author | Matthew Wild <mwild1@gmail.com> | 2010-06-02 13:03:55 +0100 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2010-06-02 13:03:55 +0100 |
commit | faf2be988f1e0f39490ad64e8c6781e6eece30a9 (patch) | |
tree | e9ed083b64f9cb0d9907dae606d134250ddf93e3 /util/filters.lua | |
parent | 961f01d6e9cac747e90c9509e64083116fef66cd (diff) | |
download | prosody-faf2be988f1e0f39490ad64e8c6781e6eece30a9.tar.gz prosody-faf2be988f1e0f39490ad64e8c6781e6eece30a9.zip |
util.filters: Don't traceback with no filters of a type added
Diffstat (limited to 'util/filters.lua')
-rw-r--r-- | util/filters.lua | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/util/filters.lua b/util/filters.lua index 123226c5..ee0e6bba 100644 --- a/util/filters.lua +++ b/util/filters.lua @@ -16,8 +16,10 @@ function initialize(session) 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 |