Merge "Fix bug when exiting Media Viewer while image is loading"

This commit is contained in:
jenkins-bot 2014-04-16 20:39:23 +00:00 committed by Gerrit Code Review
commit fff6c55695

View file

@ -499,6 +499,12 @@
this.thumbnailPreloadQueue = this.pushLightboxImagesIntoQueue( function( lightboxImage ) {
return function() {
// viewer.ui.canvas.getLightboxImageWidths needs the viewer to be open
// because it needs to read the size of visible elements
if ( !viewer.isOpen ) {
return;
}
return viewer.fetchThumbnailForLightboxImage(
lightboxImage,
viewer.ui.canvas.getLightboxImageWidths( lightboxImage ).real