diff --git a/src/components/Document/DocumentLocalSearch/DocumentLocalSearch.vue b/src/components/Document/DocumentLocalSearch/DocumentLocalSearch.vue index c5afaab4ea..0cd2b0c520 100644 --- a/src/components/Document/DocumentLocalSearch/DocumentLocalSearch.vue +++ b/src/components/Document/DocumentLocalSearch/DocumentLocalSearch.vue @@ -16,12 +16,12 @@ const props = defineProps({ }, occurrences: { type: Number, - default: null + default: 0 } }) -const disabledPrevious = computed(() => props.activeIndex === 0) -const disabledNext = computed(() => props.activeIndex === props.occurrences || props.occurrences === null) +const disabledPrevious = computed(() => !props.modelValue || props.activeIndex === 0) +const disabledNext = computed(() => !props.modelValue || props.activeIndex === props.occurrences)