У меня есть карусель, которая отображает отзывы. При нажатии на кнопку я получаю эту ошибку:
TypeError: $$invalidate(...) is not a function
Странно, все работает, поэтому ничего не сломано. Но я не могу понять, откуда эта ошибка или что ее вызывает. Вот код:
<script>
let showntestimonial = 1;
const testimonials = [ { // array of objects } ];
</script>
<section class="customer-testimonial">
<button
class="arrowbox"
on:click={() => (showntestimonial += 2)((showntestimonial = showntestimonial % 3))}>
<i class="far fa-chevron-left" />
</button>
<div class="textbox">
<p>
{@html testimonials[showntestimonial].text[$language]}
</p>
<h2>
{@html testimonials[showntestimonial].name}
</h2>
</div>
<button
class="arrowbox"
on:click={() => (showntestimonial++)((showntestimonial = showntestimonial % 3))}>
<i class="far fa-chevron-right" />
</button>
</section>