Skip to content

Commit d17c352

Browse files
committed
Switch ordering getKey to using wrap instead for consistency.
1 parent a312e46 commit d17c352

File tree

1 file changed

+6
-6
lines changed
  • CSharp.lua/CoreSystem.Lua/CoreSystem/Collections

1 file changed

+6
-6
lines changed

CSharp.lua/CoreSystem.Lua/CoreSystem/Collections/Linq.lua

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -437,11 +437,11 @@ local function orderBy(source, keySelector, comparer, TKey, descending)
437437
if comparer == nil then comparer = Comparer_1(TKey).getDefault() end
438438
local keys = {}
439439
local function getKey(t)
440-
local key = t or t == nil and null
441-
local k = keys[key]
440+
local item = wrap(t)
441+
local k = keys[item]
442442
if k == nil then
443443
k = keySelector(t)
444-
keys[key] = k
444+
keys[item] = k
445445
end
446446
return k
447447
end
@@ -487,11 +487,11 @@ local function thenBy(source, keySelector, comparer, TKey, descending)
487487
if comparer == nil then comparer = Comparer_1(TKey).getDefault() end
488488
local keys = {}
489489
local function getKey(t)
490-
local key = t or t == nil and null
491-
local k = keys[key]
490+
local item = wrap(t)
491+
local k = keys[item]
492492
if k == nil then
493493
k = keySelector(t)
494-
keys[key] = k
494+
keys[item] = k
495495
end
496496
return k
497497
end

0 commit comments

Comments
 (0)