Why not have it default to
height if
iconSize is absent (
nil)?
You can then use a fallback assignment like the following:
Code:
local height = G["castbar"]["player"]["height"];
local size = G["castbar"]["player"]["iconSize"] or height;
castbar:SetHeight(height);
icon:SetSize(size,size);