Skip to content

Commit

Permalink
remove an uneeded finally
Browse files Browse the repository at this point in the history
  • Loading branch information
MatthewHerbst committed Dec 22, 2024
1 parent 3b0c905 commit c2075a4
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/utils/startPrint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export function startPrint(printWindow: HTMLIFrameElement, options: UseReactToPr
print(printWindow)
.then(() => {
onAfterPrint?.();
removePrintIframe(preserveAfterPrint);
})
.catch((error: unknown) => {
if (onPrintError) {
Expand All @@ -38,9 +39,6 @@ export function startPrint(printWindow: HTMLIFrameElement, options: UseReactToPr
suppressErrors,
});
}
})
.finally(() => {
removePrintIframe(preserveAfterPrint);
});
} else {
// Some browsers do not have a `.print` available, even though they should
Expand Down

0 comments on commit c2075a4

Please sign in to comment.