aboutsummaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2016-03-10 17:48:53 +0000
committerMatthew Wild <mwild1@gmail.com>2016-03-10 17:48:53 +0000
commite5d07c158f99a78a1e69c4ad2ffc297e2c6d4dea (patch)
tree4f91ac59d69219c18a3d77d813be28d625afb03c /util
parentb1279bc9a50d82e07ec96ed5b021071cd78c8521 (diff)
downloadprosody-e5d07c158f99a78a1e69c4ad2ffc297e2c6d4dea.tar.gz
prosody-e5d07c158f99a78a1e69c4ad2ffc297e2c6d4dea.zip
util.iterators: Don't replace var, as we should preserve var from the original iterator [luacheck]
Diffstat (limited to 'util')
-rw-r--r--util/iterators.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/util/iterators.lua b/util/iterators.lua
index 868ba786..92f75189 100644
--- a/util/iterators.lua
+++ b/util/iterators.lua
@@ -154,7 +154,7 @@ end
-- Convert the values returned by an iterator to an array
function it.to_array(f, s, var)
- local t, var = {};
+ local t = {};
while true do
var = f(s, var);
if var == nil then break; end