Skip to content

Commit 4420dee

Browse files
duszmoxCopilot
andauthored
Update packages/admin/src/pages/Widgets.page.tsx
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 7564774 commit 4420dee

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

packages/admin/src/pages/Widgets.page.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,10 @@ export function WidgetsPage() {
128128
type='number'
129129
min={1}
130130
value={pages[selected]?.durationSec || 10}
131-
onChange={(e) => setDuration(Math.max(1, parseInt(e.target.value || '10', 10)))}
131+
onChange={(e) => {
132+
const v = Number(e.target.value);
133+
setDuration(Number.isNaN(v) ? 10 : Math.max(1, v));
134+
}}
132135
width='6rem'
133136
/>
134137
<Text>Cím:</Text>

0 commit comments

Comments
 (0)