Skip to content

Commit

Permalink
refactor: type safety and unused import
Browse files Browse the repository at this point in the history
  • Loading branch information
xxori committed Oct 22, 2023
1 parent 2e13d05 commit ad6620c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/components/settings/SettingsCategoryAppearance.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
import ZondiconsEditPencil from "~icons/zondicons/edit-pencil";
import ZondiconsAddSolid from "~icons/zondicons/add-solid";
import Switch from "../base/Switch.svelte";
import Modal from "../base/Modal.svelte";
import PreviewArea from "../preview/PreviewArea.svelte";
function downloadTheme(t: Theme) {
Expand Down Expand Up @@ -200,7 +199,7 @@
<svelte:window
on:click={(event) => {
if (editingName == null) return;
if (!event.target.className.includes("editable")) {
if (event.target instanceof HTMLElement && !event.target.className.includes("editable")) {
if (document.getElementsByClassName("editable").length != 0) {
let id = parseInt(
document.getElementsByClassName("editable")[0].id
Expand Down

0 comments on commit ad6620c

Please sign in to comment.