Skip to content

Commit 772010d

Browse files
committed
add todo to replace deprecated ie method
1 parent 5754752 commit 772010d

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/components/AddToCalendar.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ function isMobile() {
5454
return false;
5555
}
5656

57+
// @ts-expect-error TODO: replace deprecated method
5758
const isIE = (typeof window !== 'undefined' && window.navigator.msSaveOrOpenBlob && window.Blob) as boolean;
5859

5960
const getCurrentURL = () => {
@@ -200,6 +201,7 @@ export const AddToCalendar: FC<AddToCalendarProps> = ({
200201
const blob = new Blob([url], { type: 'text/calendar;charset=utf-8' });
201202

202203
if (isIE) {
204+
// @ts-expect-error TODO: replace deprecated method
203205
window.navigator.msSaveOrOpenBlob(blob, filename);
204206
} else {
205207
// many browsers do not properly support downloading data URIs

0 commit comments

Comments
 (0)