mirror of
https://github.com/rommapp/romm.git
synced 2026-12-06 07:54:18 +01:00
remove uses of isundefined
This commit is contained in:
2 files changed
+5
-6
No files matched your search
@@ -9,7 +9,6 @@ import { storeToRefs } from "pinia";
|
||||
import { useDisplay } from "vuetify";
|
||||
import { useRouter } from "vue-router";
|
||||
import { useI18n } from "vue-i18n";
|
||||
import { isUndefined } from "lodash";
|
||||
|
||||
// Props
|
||||
const { xs } = useDisplay();
|
||||
@@ -68,7 +67,7 @@ onMounted(() => {
|
||||
filter: filterParam,
|
||||
value: valueParam,
|
||||
} = router.currentRoute.value.query;
|
||||
if (!isUndefined(searchParam) && searchParam !== searchText.value) {
|
||||
if (searchParam !== undefined && searchParam !== searchText.value) {
|
||||
searchText.value = searchParam as string;
|
||||
}
|
||||
|
||||
@@ -87,7 +86,7 @@ onMounted(() => {
|
||||
watch(
|
||||
router.currentRoute.value.query,
|
||||
(query) => {
|
||||
if (!isUndefined(query.search) && query.search !== searchText.value) {
|
||||
if (query.search !== undefined && query.search !== searchText.value) {
|
||||
searchText.value = query.search as string;
|
||||
fetchRoms();
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<script setup lang="ts">
|
||||
import storeGalleryFilter from "@/stores/galleryFilter";
|
||||
import type { Events } from "@/types/emitter";
|
||||
import { debounce, isUndefined } from "lodash";
|
||||
import { debounce } from "lodash";
|
||||
import type { Emitter } from "mitt";
|
||||
import { storeToRefs } from "pinia";
|
||||
import { inject, nextTick, onMounted, watch } from "vue";
|
||||
@@ -27,7 +27,7 @@ function clear() {
|
||||
|
||||
onMounted(() => {
|
||||
const { search: searchTerm } = router.currentRoute.value.query;
|
||||
if (!isUndefined(searchTerm) && searchTerm !== filterText.value) {
|
||||
if (searchTerm !== undefined && searchTerm !== filterText.value) {
|
||||
filterText.value = searchTerm as string;
|
||||
filterRoms();
|
||||
}
|
||||
@@ -36,7 +36,7 @@ onMounted(() => {
|
||||
watch(
|
||||
() => router.currentRoute.value.query,
|
||||
(query) => {
|
||||
if (!isUndefined(query.search) && query.search !== filterText.value) {
|
||||
if (query.search !== undefined && query.search !== filterText.value) {
|
||||
filterText.value = query.search as string;
|
||||
filterRoms();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user