2
0
mirror of https://github.com/iconify/iconify.git synced 2024-11-09 23:00:56 +00:00

Do not scan DOM in SVG framework if DOM is not ready yet

This commit is contained in:
Vjacheslav Trushkin 2020-07-29 10:20:40 +03:00
parent b927eecf88
commit 9079c87e28

View File

@ -64,6 +64,9 @@ export function scanDOM(root?: HTMLElement): void {
if (!root) {
root = getRoot();
}
if (!root || !root.querySelectorAll) {
return;
}
findPlaceholders(root).forEach((item) => {
const element = item.element;
const iconName = item.name;