From 87040b525b3f8ad4f892a2a5c921d49fcd3c2dd3 Mon Sep 17 00:00:00 2001 From: NFriedo <69233063+NFriedo@users.noreply.github.com> Date: Mon, 7 Oct 2024 16:01:02 +0200 Subject: [PATCH] fix eslint errors --- src/components/copy-result-modal/CopyResultModal.vue | 4 +--- src/components/lern-store/LernstoreDetailView.vue | 4 ++-- src/store/calendar.js | 3 +-- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/components/copy-result-modal/CopyResultModal.vue b/src/components/copy-result-modal/CopyResultModal.vue index a80d8477c4..7082db4f53 100644 --- a/src/components/copy-result-modal/CopyResultModal.vue +++ b/src/components/copy-result-modal/CopyResultModal.vue @@ -212,9 +212,7 @@ export default { let found = false; items.forEach((item) => { if (found) return; - if (item.elements.find((e) => types.includes(e.type))) { - found = true; - } + found = item.elements.find((e) => types.includes(e.type)); }); return found; }, diff --git a/src/components/lern-store/LernstoreDetailView.vue b/src/components/lern-store/LernstoreDetailView.vue index 1178796fce..a75ee58054 100644 --- a/src/components/lern-store/LernstoreDetailView.vue +++ b/src/components/lern-store/LernstoreDetailView.vue @@ -333,8 +333,8 @@ export default { this.window.height = window.innerHeight; }, goBack() { - if (window.history.length > 1 && this.$router) { - this.$router.back(); + if (window.history.length > 1) { + this.$router?.back(); } else { window.close(); } diff --git a/src/store/calendar.js b/src/store/calendar.js index 26e502b877..85f206bec3 100644 --- a/src/store/calendar.js +++ b/src/store/calendar.js @@ -7,8 +7,7 @@ import { $axios } from "@/utils/api"; const calendarModule = mergeDeep(base, { actions: { removeDate: async function (ctx, payload) { - // eslint-disable-next-line @typescript-eslint/no-unused-expressions - (await $axios.delete("/v1/" + baseUrl + "/" + payload.id)).data; + await $axios.delete("/v1/" + baseUrl + "/" + payload.id); }, }, });