Skip to content

Commit

Permalink
Linter fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ciscoheat committed Jun 26, 2024
1 parent 2644d0a commit a5ed133
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/lib/client/SuperDebug.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,7 @@
return '#}#undefined';
}
if (typeof this === 'object' && this[key] instanceof Date) {
// @ts-expect-error Date checking works with isNaN
return '#}D#' + (isNaN(this[key]) ? 'Invalid Date' : value);
}
if (typeof value === 'number') {
Expand Down
6 changes: 2 additions & 4 deletions src/lib/client/customValidity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,8 @@ export function setCustomValidityForm(
formElement: HTMLFormElement,
errors: ValidationErrors<Record<string, unknown>>
) {
for (const el of formElement.querySelectorAll<
HTMLInputElement & HTMLSelectElement & HTMLTextAreaElement & HTMLButtonElement
>('input,select,textarea,button')) {
if (noCustomValidityDataAttribute in el.dataset) {
for (const el of formElement.querySelectorAll<HTMLInputElement>('input,select,textarea,button')) {
if (('dataset' in el && noCustomValidityDataAttribute in el.dataset) || !el.name) {
continue;
}

Expand Down

0 comments on commit a5ed133

Please sign in to comment.