From 434c882f35e7f4e9f1b233a91faaf992c4ee7a75 Mon Sep 17 00:00:00 2001 From: Lothrik Date: Sun, 5 Nov 2023 07:04:16 -0800 Subject: [PATCH] Fix timeless jewel devotion filter generation --- src/Classes/TreeTab.lua | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/Classes/TreeTab.lua b/src/Classes/TreeTab.lua index e91dd723f3..86167f581f 100644 --- a/src/Classes/TreeTab.lua +++ b/src/Classes/TreeTab.lua @@ -1790,7 +1790,7 @@ function TreeTabClass:FindTimelessJewel() } } - if (timelessData.sharedResults.devotionVariant1.id > 1) or (timelessData.sharedResults.devotionVariant2.id > 1) then + if data.timelessJewelTradeIDs[timelessData.jewelType.id].devotion ~= nil then local devotionFilters = {} if timelessData.sharedResults.devotionVariant1.id > 1 then t_insert(devotionFilters, { id = data.timelessJewelTradeIDs[timelessData.jewelType.id].devotion[timelessData.sharedResults.devotionVariant1.id - 1] }) @@ -1798,10 +1798,12 @@ function TreeTabClass:FindTimelessJewel() if timelessData.sharedResults.devotionVariant2.id > 1 then t_insert(devotionFilters, { id = data.timelessJewelTradeIDs[timelessData.jewelType.id].devotion[timelessData.sharedResults.devotionVariant2.id - 1] }) end - t_insert(search.query.stats, { - filters = devotionFilters, - type = "and" - }) + if next(devotionFilters) then + t_insert(search.query.stats, { + filters = devotionFilters, + type = "and" + }) + end end Copy("https://www.pathofexile.com/trade/search/?q=" .. (s_gsub(dkjson.encode(search), "[^a-zA-Z0-9]", function(a)