Skip to content

Commit

Permalink
No need to wrap onError into another function
Browse files Browse the repository at this point in the history
  • Loading branch information
e1himself committed Aug 26, 2022
1 parent f94d53a commit fae4772
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/HtmlInjection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ function useScripts(html: Props['html'], onError: Props['onError']) {
const script = document.createElement('script');
setScriptAttributes(script, attributes);

script.addEventListener('error', () => onError());
script.addEventListener('error', onError);
document.body.appendChild(script);
});

Expand Down

0 comments on commit fae4772

Please sign in to comment.