fix: fail if a label is absent
This commit is contained in:
parent
7ca60da3fd
commit
c7c9e37c99
1 changed files with 2 additions and 1 deletions
|
@ -40,8 +40,9 @@ end
|
|||
|
||||
function TextWidget:addLabel(label, position)
|
||||
local complexLabel = {}
|
||||
assert(label ~= nil, "Label can't be nil")
|
||||
complexLabel.label = label
|
||||
complexLabel.position = position
|
||||
complexLabel.position = position or "left"
|
||||
table.insert(self.labels, complexLabel)
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue