fix: pcall-guard C_ClassInfo.GetSpecInfo in Types.lua spec iteration
lint / lint (push) Has been cancelled
lint / lint (push) Has been cancelled
Same CoA client issue as coa-details: GetAllSpecs(class) returns items that GetSpecInfo rejects with 'Expected string' at arg #2. Wrap the addSpec(class, GetSpecInfo(class, spec)) call in pcall so bad iterations skip silently rather than spamming Error.txt.
This commit is contained in:
+4
-1
@@ -3839,7 +3839,10 @@ do
|
|||||||
local specs = C_ClassInfo.GetAllSpecs(class)
|
local specs = C_ClassInfo.GetAllSpecs(class)
|
||||||
if specs then
|
if specs then
|
||||||
for _, spec in ipairs(specs) do
|
for _, spec in ipairs(specs) do
|
||||||
addSpec(class, C_ClassInfo.GetSpecInfo(class, spec))
|
local ok, info = pcall(C_ClassInfo.GetSpecInfo, class, spec)
|
||||||
|
if ok and info then
|
||||||
|
addSpec(class, info)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user