Skip to content

Commit

Permalink
Merge pull request #6540 from surveyjs/bug/6531
Browse files Browse the repository at this point in the history
Work for #6531: do not render icons if document is not defined
  • Loading branch information
andrewtelnov authored Jul 17, 2023
2 parents 8adcc88 + 888c69d commit c3aaa7d
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 c3aaa7d

Please sign in to comment.