diff --git a/lib/web/magnifier/magnify.js b/lib/web/magnifier/magnify.js index 15dfc29d75772..7c92e5fd1ca45 100644 --- a/lib/web/magnifier/magnify.js +++ b/lib/web/magnifier/magnify.js @@ -854,9 +854,11 @@ define([ var $activeStageFrame = $(gallerySelector).data('fotorama').activeFrame.$stageFrame; if (!$activeStageFrame.find(magnifierZoomSelector).length) { hideMagnifier(); - config.magnifierOpts.large = $(gallerySelector).data('fotorama').activeFrame.img; - config.magnifierOpts.full = fotorama.data[fotorama.activeIndex].original; - !checkForVideo($activeStageFrame) && $($activeStageFrame).magnify(config.magnifierOpts); + if (config.magnifierOpts) { + config.magnifierOpts.large = $(gallerySelector).data('fotorama').activeFrame.img; + config.magnifierOpts.full = fotorama.data[fotorama.activeIndex].original; + !checkForVideo($activeStageFrame) && $($activeStageFrame).magnify(config.magnifierOpts); + } } });