import mediumZoom from 'src/config/medium-zoom';
import lqip from 'src/modules/lqip';

window.addEventListener('DOMContentLoaded', () => {
  // Run medium zoom
  // mediumZoom();
  lqip({
    afterReplace: (lqipImage, originalImage) => {
      lqipImage.remove();
      mediumZoom(originalImage);
    },
  });
});

import mediumZoom from 'src/config/medium-zoom';
import lqip from 'src/modules/lqip';

window.addEventListener('DOMContentLoaded', () => {
  // Run medium zoom
  // mediumZoom();
  lqip({
    afterReplace: (lqipImage, originalImage) => {
      if (lqipImage) lqipImage.remove();
      mediumZoom(originalImage);
    },
  });
});

Test for the presence of if, before removing
Test for the presence of if, before removing

