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 {
|
export function keypadReduce(current: string, key: string): string {
|
||||||
if (key === "back") return current.slice(0, -1);
|
if (key === "back") return current.slice(0, -1);
|
||||||
if (!/^\d$/.test(key)) return current;
|
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;
|
if (current.length >= MAX_DIGITS) return current;
|
||||||
return current + key;
|
return current + key;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,3 +2,4 @@ node_modules
|
|||||||
dist
|
dist
|
||||||
.env
|
.env
|
||||||
.env.local
|
.env.local
|
||||||
|
*.tsbuildinfo
|
||||||
|
|||||||
Reference in New Issue
Block a user