Skip to content

Commit 9285327

Browse files
committed
bug fix
1 parent e49b878 commit 9285327

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

KeyUI.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -786,7 +786,7 @@ function addon:SetKey(button)
786786

787787
-- Calculate the maximum allowed characters based on button width
788788
local max_allowed_chars = math.floor(button:GetWidth() / 9)
789-
local combined_text = button.short_key:GetText() -- Combined text with modifiers if present
789+
local combined_text = button.short_key:GetText() or "" -- Combined text with modifiers if present / Use empty string if GetText() returns nil
790790

791791
-- Use Condensed font if the combined text exceeds max_allowed_chars
792792
if string.len(combined_text) > max_allowed_chars then

0 commit comments

Comments
 (0)