Skip to content

Commit

Permalink
There's actually no reason to wait all the way to load
Browse files Browse the repository at this point in the history
  • Loading branch information
Gerrit0 committed Jun 11, 2024
1 parent 27c8474 commit 625238d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/output/plugins/IconsPlugin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const ICONS_JS = `
(function() {
addIcons();
function addIcons() {
if (document.readyState !== "complete") return addEventListener("load", addIcons);
if (document.readyState === "loading") return document.addEventListener("DOMContentLoaded", addIcons);
const svg = document.body.appendChild(document.createElementNS("http://www.w3.org/2000/svg", "svg"));
svg.innerHTML = \`"SVG_HTML"\`;
svg.style.display = "none";
Expand Down

0 comments on commit 625238d

Please sign in to comment.