fix lua error

Leandro Silva [02-15-20 - 23:00]
fix lua error
Filename
LeoAltholic.txt
LeoAltholicInit.lua
ui/research.lua
diff --git a/LeoAltholic.txt b/LeoAltholic.txt
index b9dfcb1..a9f383a 100644
--- a/LeoAltholic.txt
+++ b/LeoAltholic.txt
@@ -1,7 +1,7 @@
 ## Title: Leo's Altholic
 ## APIVersion: 100029 100030
-## Version: 1.7.3
-## AddOnVersion: 173
+## Version: 1.7.4
+## AddOnVersion: 174
 ## Author: |c39B027@LeandroSilva|r
 ## SavedVariables: LeoAltholicSavedVariables LeoAltholicCharVariables
 ## DependsOn: LibStub LibFeedback LibAddonMenu-2.0
diff --git a/LeoAltholicInit.lua b/LeoAltholicInit.lua
index 00ecc82..30d6e5d 100644
--- a/LeoAltholicInit.lua
+++ b/LeoAltholicInit.lua
@@ -6,7 +6,7 @@ LeoAltholicToolbarUI = LeoAltholicToolbarUI or {}

 LeoAltholic.name = "LeoAltholic"
 LeoAltholic.displayName = "Leo's Altholic"
-LeoAltholic.version = "1.7.2"
+LeoAltholic.version = "1.7.4"
 LeoAltholic.chatPrefix = "|c39B027" .. LeoAltholic.name .. "|r: "

 LeoAltholic.TAB_BIO = "Bio"
diff --git a/ui/research.lua b/ui/research.lua
index 8327e7f..071c47e 100644
--- a/ui/research.lua
+++ b/ui/research.lua
@@ -33,7 +33,7 @@ function LeoAltholicResearchList:SetupEntry(control, data)
     for _,craft in pairs(LeoAltholic.craftResearch) do
         control.craft[craft] = GetControl(control, "Craft" .. craft)

-        local researching = #data.research.doing[craft]
+        local researching = data.research.doing[craft] and #data.research.doing[craft] or 0
         local missing = LeoAltholic.GetNumMissingTraitsFor(craft, data.name)
         local output
         color = '|c'..LeoAltholic.color.hex.green