Skip to content

Commit

Permalink
Work for #6531: do not render icons if document is not defined
Browse files Browse the repository at this point in the history
  • Loading branch information
dk981234 committed Jul 17, 2023
1 parent 5424d86 commit 888c69d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/svgbundle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export class SvgIconRegistry {
}
public renderIcons() {
const containerId = "sv-icon-holder-global-container";
if(!settings.environment.root.getElementById(containerId)) {
if(!!settings.environment && !settings.environment.root.getElementById(containerId)) {
let iconsDiv = document.createElement("div");
iconsDiv.id = containerId;
iconsDiv.innerHTML = "<svg>" + this.iconsRenderedHtml() + "</svg>";
Expand Down

0 comments on commit 888c69d

Please sign in to comment.