mirror of
https://github.com/jason5ng32/MyIP.git
synced 2026-11-04 08:55:47 +00:00
Fix(ui): Enter on an empty MAC Lookup input does nothing
The shared parser rejects an empty string, so Enter in the empty field showed "Invalid physical address". onSubmit now returns early on empty input, as IP Calculator does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
87d49cec3d
commit
d3df177df9
1 file changed
+2
-1
@@ -178,10 +178,11 @@ const validateInput = (input) => {
|
||||
};
|
||||
|
||||
const onSubmit = () => {
|
||||
const raw = queryMAC.value.trim();
|
||||
if (!raw) return;
|
||||
trackEvent('Section', 'StartClick', 'MACChecker');
|
||||
errorMsg.value = '';
|
||||
macCheckResult.value = {};
|
||||
const raw = queryMAC.value.trim();
|
||||
picked.value = EXAMPLES.some((e) => e.input === raw) ? raw : '';
|
||||
const query = validateInput(raw);
|
||||
if (query) getMacInfo(query);
|
||||
|
||||
Reference in new issue
Block a user