For searching make sure we have the search field before trying to do a compare for all searchtypes.
Ackis [11-25-08 - 21:06]
For searching make sure we have the search field before trying to do a compare for all searchtypes.
diff --git a/ARLFrame.lua b/ARLFrame.lua
index 3e0d51e..4648640 100644
--- a/ARLFrame.lua
+++ b/ARLFrame.lua
@@ -2396,6 +2396,7 @@ function addon.RecipeItem_OnClick(button)
local clickedIndex = addon.RecipeListButton[button].sI
+ addon:Print("Debug Code (Will be removed when ticket 254 is fixed.)")
addon:Print(clickedIndex)
addon:Print(button)
diff --git a/AckisRecipeList.lua b/AckisRecipeList.lua
index f6a2201..6857f0f 100644
--- a/AckisRecipeList.lua
+++ b/AckisRecipeList.lua
@@ -2078,22 +2078,22 @@ function addon:SearchRecipeDB(RecipeDB, searchstring)
if sfind(tolower(SpellID),searchstring) or
-- Allow us to search byitem ID
- sfind(tolower(recipe["ItemID"]),searchstring) or
+ (recipe["ItemID"] and sfind(tolower(recipe["ItemID"]),searchstring)) or
-- Allow us to search by name
- sfind(tolower(recipe["Name"]),searchstring) or
+ (recipe["Name"] and sfind(tolower(recipe["Name"]),searchstring)) or
-- Allow us to search by locations
- sfind(recipe["Locations"],searchstring) or
+ (recipe["Locations"] and sfind(recipe["Locations"],searchstring)) or
-- Allow us to search by specialty
(recipe["Specialty"] and sfind(recipe["Specialty"],searchstring)) or
-- Allow us to search by skill level
- sfind(recipe["Level"],searchstring) or
+ (recipe["Level"] and sfind(recipe["Level"],searchstring)) or
-- Allow us to search by Rarity
- sfind(recipe["Rarity"],searchstring) then
+ (recipe["Rarity"] and sfind(recipe["Rarity"],searchstring)) then
recipe["Search"] = true