Fix for the LibItemSearch error.
Xruptor [07-23-18 - 21:04]
Fix for the LibItemSearch error.
diff --git a/libs/LibItemSearchGrid-1.0/LibItemSearchGrid-1.0.lua b/libs/LibItemSearchGrid-1.0/LibItemSearchGrid-1.0.lua
index 9580c24..132366b 100644
--- a/libs/LibItemSearchGrid-1.0/LibItemSearchGrid-1.0.lua
+++ b/libs/LibItemSearchGrid-1.0/LibItemSearchGrid-1.0.lua
@@ -457,7 +457,7 @@ end
if IsAddOnLoaded('ItemRack') then
function ES_FindSets(setList, search, exactMatch)
for setName, _ in pairs(ItemRackUser.Sets) do
- if ES_TrySetName(setName, search, exactMatch) then
+ if setName and ES_TrySetName(setName, search, exactMatch) then
if (search ~= '*') or (search == '*' and setName:sub(1,1) ~= '~') then --note: this additional tilde check skips internal ItemRack sets when doing a global set search (internal sets are prefixed with tilde, such as ~Unequip, and they contain temporary data that should not be part of a global search)
table.insert(setList, setName)
end
@@ -518,9 +518,9 @@ elseif IsAddOnLoaded('Wardrobe') then
--Last Resort: Blizzard Equipment Manager
else
function ES_FindSets(setList, search, exactMatch)
- for i = 1, GetNumEquipmentSets() do
- local setName = GetEquipmentSetInfo(i)
- if ES_TrySetName(setName, search, exactMatch) then
+ for i = 1, C_EquipmentSet.GetNumEquipmentSets() do
+ local setName = C_EquipmentSet.GetEquipmentSetInfo(i)
+ if setName and ES_TrySetName(setName, search, exactMatch) then
table.insert(setList, setName)
end
end