Skip to content

Commit

Permalink
feat: try to add listener earlier
Browse files Browse the repository at this point in the history
  • Loading branch information
peterpeterparker committed Jan 4, 2022
1 parent b326232 commit d3a2912
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/modals/invoice/InvoiceModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,11 @@ const InvoiceModal: React.FC<Props> = (props) => {

useEffect(() => {
(async () => {
document.addEventListener('ionBackButton', onBackButton);

await init();
})();

document.addEventListener('ionBackButton', onBackButton);

return () => document.removeEventListener('ionBackButton', onBackButton);

// eslint-disable-next-line react-hooks/exhaustive-deps
Expand Down

0 comments on commit d3a2912

Please sign in to comment.