Use own createElement() instead of doc.createElement

This commit is contained in:
djmaze 2021-03-25 09:38:45 +01:00
parent 7eaaa0a793
commit 23e15fd161
6 changed files with 12 additions and 11 deletions

View file

@ -1,5 +1,5 @@
import { SaveSettingsStep } from 'Common/Enums';
import { doc, elementById } from 'Common/Globals';
import { doc, createElement, elementById } from 'Common/Globals';
export const
isArray = Array.isArray,
@ -119,7 +119,7 @@ export function changeTheme(value, themeTrigger = ()=>{}) {
.then(data => {
if (data && isArray(data) && 2 === data.length) {
if (themeLink && !themeStyle) {
themeStyle = doc.createElement('style');
themeStyle = createElement('style');
themeStyle.id = 'app-theme-style';
themeLink.after(themeStyle);
themeLink.remove();