refactor(web): LabelEditor ignores blank labels; revert gratuitous tsconfig ES2022 bump

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-04 09:19:27 +02:00
parent 8d2323ed95
commit e8d173a18f
3 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -26,7 +26,7 @@ test("typing EN and SV emits both labels; empty langs are omitted", async () =>
renderApp(<Harness onChange={(v) => seen.push(v)} />);
await userEvent.type(screen.getByLabelText(/label \(en\)/i), "Bronze");
await userEvent.type(screen.getByLabelText(/label \(sv\)/i), "Brons");
const last = seen.at(-1)!;
const last = seen[seen.length - 1]!;
expect(last).toEqual(
expect.arrayContaining([
{ lang: "en", label: "Bronze" },
+1 -1
View File
@@ -21,7 +21,7 @@ export function LabelEditor({
const set = (lang: string, label: string) => {
const others = value.filter((l) => l.lang !== lang);
onChange(label ? [...others, { lang, label }] : others);
onChange(label.trim() ? [...others, { lang, label }] : others);
};
return (
+2 -2
View File
@@ -1,9 +1,9 @@
{
"compilerOptions": {
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
"target": "ES2022",
"target": "ES2020",
"useDefineForClassFields": true,
"lib": ["ES2022", "DOM", "DOM.Iterable"],
"lib": ["ES2020", "DOM", "DOM.Iterable"],
"module": "ESNext",
"skipLibCheck": true,