diff --git a/src/components/HtmlInjection.tsx b/src/components/HtmlInjection.tsx index b45b3479..7f72e8b5 100644 --- a/src/components/HtmlInjection.tsx +++ b/src/components/HtmlInjection.tsx @@ -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); });