From: Matthew Wild Date: Thu, 10 Mar 2016 17:48:53 +0000 (+0000) Subject: util.iterators: Don't replace var, as we should preserve var from the original iterat... X-Git-Url: https://git.enpas.org/?a=commitdiff_plain;h=3e7b0bccbce2e1c8bc9da114e3323f29e11b6ead;p=prosody.git util.iterators: Don't replace var, as we should preserve var from the original iterator [luacheck] --- 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