Fixed wallpaper change breaking terminal

This commit is contained in:
Dustin Brett 2022-05-21 12:14:44 -07:00
parent 5a36d991e4
commit 76474ab2c9

View File

@ -62,7 +62,7 @@ const useWallpaper = (
const loadWallpaper = useCallback(() => {
if (desktopRef.current) {
desktopRef.current.setAttribute("style", "");
desktopRef.current.querySelector("canvas")?.remove();
desktopRef.current.querySelector(":scope > canvas")?.remove();
if (
typeof window.OffscreenCanvas !== "undefined" &&
@ -98,7 +98,8 @@ const useWallpaper = (
if (currentWallpaperUrl === wallpaperImage) return;
if (currentWallpaperUrl) cleanUpBufferUrl(currentWallpaperUrl);
desktopRef.current?.querySelector("canvas")?.remove();
desktopRef.current?.setAttribute("style", "");
desktopRef.current?.querySelector(":scope > canvas")?.remove();
if (wallpaperImage === "VANTA") vantaWaves(config)();
let wallpaperUrl = "";