Refactor(Playground): Fix the bug that unexpectedly remove styles for base

Fix the bug that unexpectedly remove styles for base when editing code
This commit is contained in:
2024-05-21 16:00:03 +08:00
parent 1306872885
commit a90e7cfdca
2 changed files with 8 additions and 5 deletions

View File

@@ -11,7 +11,7 @@
window.addEventListener("message", ({ data }) => {
if (data?.type === "UPDATE") {
// Record old styles that need to be removed
const appStyleElement = document.querySelectorAll("style[id^=\"style_\"]") || [];
const appStyleElement = document.querySelectorAll("style:not(style[id$=\"_oxygen_base_style.css\"])") || [];
// Remove old app
const appSrcElement = document.querySelector("#appSrc");