From a1f19d82d78a2729352ee73f1102f0d96b747525 Mon Sep 17 00:00:00 2001 From: yann300 Date: Mon, 8 Nov 2021 12:07:08 +0100 Subject: [PATCH] rollback dom inserion order --- apps/remix-ide/src/app/tabs/theme-module.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/remix-ide/src/app/tabs/theme-module.js b/apps/remix-ide/src/app/tabs/theme-module.js index 5ea0bf1d30..4886a40731 100644 --- a/apps/remix-ide/src/app/tabs/theme-module.js +++ b/apps/remix-ide/src/app/tabs/theme-module.js @@ -63,10 +63,10 @@ export class ThemeModule extends Plugin { const nextTheme = this.themes[this.active] // Theme document.documentElement.style.setProperty('--theme', nextTheme.quality) const theme = yo`` - document.head.insertBefore(theme, document.head.firstChild) - document.getElementById('theme-link').addEventListener('load', () => { + theme.addEventListener('load', () => { if (callback) callback() }) + document.head.insertBefore(theme, document.head.firstChild) } }