Bugfix for SET

This commit is contained in:
FlightControl
2016-06-07 13:20:29 +02:00
parent 0573ebb919
commit a8a87be9c4
18 changed files with 17 additions and 5 deletions

View File

@@ -288,7 +288,11 @@ function SET_BASE:ForEach( IteratorFunction, arg, Set, Function, FunctionArgumen
local Count = 0
for ObjectID, Object in pairs( Set ) do
self:T2( Object )
if Function( unpack( FunctionArguments ), Object ) == true then
if Function then
if Function( unpack( FunctionArguments ), Object ) == true then
IteratorFunction( Object, unpack( arg ) )
end
else
IteratorFunction( Object, unpack( arg ) )
end
Count = Count + 1