From 73ec11e2be5bc21aacec57931dcd410b18ad52c9 Mon Sep 17 00:00:00 2001 From: Ackis Date: Tue, 25 Nov 2008 21:06:01 +0000 Subject: [PATCH] For searching make sure we have the search field before trying to do a compare for all searchtypes. --- ARLFrame.lua | 1 + AckisRecipeList.lua | 10 +++++----- 2 files changed, 6 insertions(+), 5 deletions(-) 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 -- 1.7.9.5