Skip to content

Commit a99d31f

Browse files
authored
feat(import tab): remove discriminator alert when the account name field is empty (#9500)
1 parent 59498c3 commit a99d31f

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/Classes/ImportTab.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ local ImportTabClass = newClass("ImportTab", "ControlHost", "Control", function(
7070
end
7171
self.controls.accountNameGo.tooltipFunc = function(tooltip)
7272
tooltip:Clear()
73-
if not self.controls.accountName.buf:match("[#%-]%d%d%d%d$") then
73+
if not self.controls.accountName.buf:match("[#%-]%d%d%d%d$") and self.controls.accountName.buf ~= "" then
7474
tooltip:AddLine(16, "^7Missing discriminator e.g. " .. self.controls.accountName.buf .. "#1234")
7575
end
7676
end
@@ -97,7 +97,7 @@ local ImportTabClass = newClass("ImportTab", "ControlHost", "Control", function(
9797

9898
self.controls.accountNameMissingDiscriminator = new("LabelControl", {"TOPLEFT",self.controls.accountName,"BOTTOMLEFT"}, {0, 8, 0, 16}, "^1Missing discriminator e.g. #1234")
9999
self.controls.accountNameMissingDiscriminator.shown = function()
100-
return not self.controls.accountName.buf:match("[#%-]%d%d%d%d$")
100+
return not self.controls.accountName.buf:match("[#%-]%d%d%d%d$") and self.controls.accountName.buf ~= ""
101101
end
102102

103103
self.controls.accountNameUnicode = new("LabelControl", {"TOPLEFT",self.controls.accountRealm,"BOTTOMLEFT"}, {0, 34, 0, 14}, "^7Note: if the account name contains non-ASCII characters it must be pasted into the textbox,\nnot typed manually.")

0 commit comments

Comments
 (0)