Skip to content

Commit a5ed133

Browse files
committed
Linter fixes
1 parent 2644d0a commit a5ed133

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

src/lib/client/SuperDebug.svelte

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,7 @@
277277
return '#}#undefined';
278278
}
279279
if (typeof this === 'object' && this[key] instanceof Date) {
280+
// @ts-expect-error Date checking works with isNaN
280281
return '#}D#' + (isNaN(this[key]) ? 'Invalid Date' : value);
281282
}
282283
if (typeof value === 'number') {

src/lib/client/customValidity.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,8 @@ export function setCustomValidityForm(
1818
formElement: HTMLFormElement,
1919
errors: ValidationErrors<Record<string, unknown>>
2020
) {
21-
for (const el of formElement.querySelectorAll<
22-
HTMLInputElement & HTMLSelectElement & HTMLTextAreaElement & HTMLButtonElement
23-
>('input,select,textarea,button')) {
24-
if (noCustomValidityDataAttribute in el.dataset) {
21+
for (const el of formElement.querySelectorAll<HTMLInputElement>('input,select,textarea,button')) {
22+
if (('dataset' in el && noCustomValidityDataAttribute in el.dataset) || !el.name) {
2523
continue;
2624
}
2725

0 commit comments

Comments
 (0)