This commit is contained in:
Konstantin Wohlwend 2026-04-14 09:19:18 -07:00
parent c7b6b597ce
commit 7caff35ba3
2 changed files with 6 additions and 3 deletions

View File

@ -1630,9 +1630,9 @@ function Draggable(props: {
<div className="text-red-500 text-sm p-2 bg-red-500/10 font-mono whitespace-pre-wrap">
A runtime error occured while rendering this widget.<br />
<br />
{props.reset && <button className="text-blue-500 hover:underline" onClick={() => {
props.reset!();
}}>Reload widget</button>}<br />
<button className="text-blue-500 hover:underline" onClick={() => {
props.reset();
}}>Reload widget</button><br />
<br />
{errorToNiceString(props.error)}
</div>

View File

@ -261,3 +261,6 @@ A: In `docs-mintlify/snippets/docs-apps-home-grid.jsx`, track visible rows while
Q: Why did internal feedback E2E tests expect 1 Inbucket message but get 2?
A: Inbucket persists mail across runs. `Mailbox.waitForMessagesWithSubject` waits until at least one match then returns **all** messages whose subject includes the string. Fixed subjects like `[Support] devtool-user@example.com` accumulate, so assertions should use a unique subject per run (e.g. `randomUUID()` in the sender email) or a baseline count before/after.
Q: Why does `@typescript-eslint/no-unnecessary-condition` fire on `props.reset` in Next.js `ErrorBoundary` `errorComponent`?
A: Nexts typings treat `reset` as always present on the error component props, so `props.reset &&` is redundant; render the reload control unconditionally and call `props.reset()` directly.