Nil not empty string

This commit is contained in:
Josh Sherman 2022-06-01 21:50:31 -05:00
parent fb4711a5e8
commit bace5c81ec
No known key found for this signature in database
GPG key ID: 55B058A80530EF22

View file

@ -90,7 +90,7 @@ function updateHomebrewMenubar()
homebrewMenubar:setTitle(string.format(' %s', numOutdated)) homebrewMenubar:setTitle(string.format(' %s', numOutdated))
homebrewMenubar:setTooltip(outdated) homebrewMenubar:setTooltip(outdated)
else else
homebrewMenubar:setTitle('') homebrewMenubar:setTitle(nil)
homebrewMenubar:setTooltip('Up to date') homebrewMenubar:setTooltip('Up to date')
end end
end end
@ -124,7 +124,7 @@ function updateSlackMenubar()
local label = v:attributeValue('AXStatusLabel') or '0' local label = v:attributeValue('AXStatusLabel') or '0'
if label == '0' then if label == '0' then
slackMenubar:setTitle('') slackMenubar:setTitle(nil)
slackMenubar:setTooltip('No unread messages') slackMenubar:setTooltip('No unread messages')
else else
slackMenubar:setTitle(string.format(' %s', label)) slackMenubar:setTitle(string.format(' %s', label))