- TitanMovable : Fix minor bug; Remove debug statement
urnati [09-22-18 - 07:18]
- TitanMovable : Fix minor bug; Remove debug statement
diff --git a/Titan/LDBToTitan.lua b/Titan/LDBToTitan.lua
index df834fc..10b8e83 100644
--- a/Titan/LDBToTitan.lua
+++ b/Titan/LDBToTitan.lua
@@ -663,7 +663,8 @@ local function CreateObject(self, _, name, obj)
-- These checks are messy but leave notes for the developer
tempname = nil
if obj.tocname then
- if pcall(function() IsAddOnLoaded(obj.tocname) end) then
+ local ok, msg = pcall(function() return IsAddOnLoaded(obj.tocname) end)
+ if ok and msg then
tempname = obj.tocname
else
notes = notes.."\n"
@@ -671,13 +672,15 @@ local function CreateObject(self, _, name, obj)
.." does NOT match the addon name per the LibDataBroker spec."
end
end
- if tempname == nil and pcall(function() IsAddOnLoaded(name) end) then
- tempname = name
- else
- tempname = nil
- notes = notes.."\n"
- .."The LDB name '"..name.."'"
- .." does NOT match the addon name."
+ if tempname == nil then
+ local ok, msg = pcall(function() return IsAddOnLoaded(name) end)
+ if ok and msg then
+ tempname = name
+ else
+ notes = notes.."\n"
+ .."The LDB name '"..name.."'"
+ .." does NOT match the addon name."
+ end
end
-- check for category and version from the TOC file
local cat, ver
@@ -878,4 +881,3 @@ LDBToTitan:SetScript("OnEvent", function(self, event, ...)
end
end
)
-TitanPrint("LDB to Titan")