docs(pwa): plan fix (keypad reduce) + gitignore tsbuildinfo
Co-Authored-By: claude-flow <ruv@ruv.net>
This commit is contained in:
@@ -536,7 +536,8 @@ const MAX_DIGITS = 6;
|
||||
export function keypadReduce(current: string, key: string): string {
|
||||
if (key === "back") return current.slice(0, -1);
|
||||
if (!/^\d$/.test(key)) return current;
|
||||
if (current === "" && key === "0") return ""; // no leading zero
|
||||
if (current === "0") return key === "0" ? "0" : key; // replace leading zero
|
||||
if (current === "" && key === "0") return ""; // no leading zero from empty
|
||||
if (current.length >= MAX_DIGITS) return current;
|
||||
return current + key;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user