Skip to content

Commit

Permalink
better check
Browse files Browse the repository at this point in the history
  • Loading branch information
martrapp committed Apr 16, 2024
1 parent 3a8a989 commit 5317798
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/astro/src/transitions/router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -305,8 +305,8 @@ async function updateDOM(
activeElement instanceof HTMLInputElement ||
activeElement instanceof HTMLTextAreaElement
) {
start && (activeElement.selectionStart = start);
end && (activeElement.selectionEnd = end);
if (typeof start === 'number') activeElement.selectionStart = start;
if (typeof end === 'number') activeElement.selectionEnd = end;
}
}
};
Expand Down

0 comments on commit 5317798

Please sign in to comment.