Skip to content

Commit

Permalink
Update src/lib/datepicker/Datepicker.svelte
Browse files Browse the repository at this point in the history
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
  • Loading branch information
bmanth60 and coderabbitai[bot] authored Oct 29, 2024
1 parent 2c1166f commit 60ad0e5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/datepicker/Datepicker.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@
}
function handleClickOutside(event: MouseEvent) {
if (isOpen && !datepickerContainerElement.contains(event.target as Node)) {
if (isOpen && datepickerContainerElement && !datepickerContainerElement.contains(event.target as Node)) {
isOpen = false;
}
}
Expand Down

0 comments on commit 60ad0e5

Please sign in to comment.