Skip to content

Commit

Permalink
Rename scriptElement back to script
Browse files Browse the repository at this point in the history
  • Loading branch information
riffbyte committed Oct 6, 2022
1 parent 4877cc2 commit b8ba95d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/components/HtmlInjection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ function useScripts(html: Props['html'], onError: Props['onError']) {
return;
}

const scriptElement = document.createElement('script');
setScriptAttributes(scriptElement, attributes);
const script = document.createElement('script');
setScriptAttributes(script, attributes);

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

if (typeof iframely !== 'undefined') {
Expand Down

0 comments on commit b8ba95d

Please sign in to comment.