mirror of
https://github.com/Ukendio/jecs.git
synced 2025-04-25 01:20:04 +00:00
Fix EmptyQuery to properly return an empty iterator
This commit is contained in:
parent
97d6955da0
commit
a2f5c4e87d
1 changed files with 3 additions and 1 deletions
|
@ -662,7 +662,7 @@ local function noop(_self: Query, ...): () -> ()
|
|||
end
|
||||
|
||||
local EmptyQuery = {
|
||||
__iter = iterNoop,
|
||||
__iter = noop,
|
||||
next = noop,
|
||||
replace = noop,
|
||||
without = function(self)
|
||||
|
@ -670,6 +670,8 @@ local EmptyQuery = {
|
|||
end
|
||||
}
|
||||
|
||||
setmetatable(EmptyQuery, EmptyQuery)
|
||||
|
||||
export type Query = typeof(EmptyQuery)
|
||||
|
||||
type CompatibleArchetype = { archetype: Archetype, indices: { number } }
|
||||
|
|
Loading…
Reference in a new issue