I am facing this uncaught type error in swatch-renderer.js on listing page in magento 2.3.6

Till now i have tried 2 solutions but no luck: 1: added following lines catalog_category_view.xml

<referenceContainer name="content">
            <container name="product.info.media" htmlTag="div" htmlClass="product media" after="product.info.main">
                <block class="Magento\Catalog\Block\Product\View\Gallery" name="product.info.media.image.gallery" template="Custom_Product::product/view/gallery.phtml"/>
                <block class="Magento\ProductVideo\Block\Product\View\Gallery" name="product.info.media.video" after="product.info.media.image" template="product/view/gallery.phtml"/>

2: swatch-renderer.js

if (isInitial) {
    if ($.isFunction($(this.options.mediaGallerySelector).AddFotoramaVideoEvents)) {

i have been facing this issue for a long time.

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.