Skip to content

Commit 5a077ae

Browse files
VINOD KUMAR MURALIDHARANclaude
authored andcommitted
Fix TS18047: coerce textContent null to empty string
textContent() returns string | null; .catch(() => "") only handles rejected promises, not resolved null. Adding ?? "" ensures newText is always a string, fixing the TypeScript type check in CI. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 4f96e31 commit 5a077ae

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

pnaa/e2e/local/data-table.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ test.describe("Data Table - Pagination", () => {
186186
await page.waitForTimeout(500);
187187

188188
// Content should have changed OR button became disabled (last page)
189-
const newText = await firstRow.textContent().catch(() => "");
189+
const newText = (await firstRow.textContent().catch(() => "")) ?? "";
190190
const buttonDisabled = !(await nextButton.isEnabled());
191191
const contentChanged = newText !== initialText;
192192

0 commit comments

Comments
 (0)