Close overlay if print service was not initialized

Fixes #7720
This commit is contained in:
Rob Wu 2016-10-13 23:36:57 +02:00
parent 1c869906c8
commit 0c21ebf9f3

View File

@ -202,7 +202,9 @@
return;
}
ensureOverlay().then(function () {
OverlayManager.open('printServiceOverlay');
if (activeService) {
OverlayManager.open('printServiceOverlay');
}
});
try {
@ -210,6 +212,10 @@
} finally {
if (!activeService) {
console.error('Expected print service to be initialized.');
if (OverlayManager.active === 'printServiceOverlay') {
OverlayManager.close('printServiceOverlay');
}
return;
}
var activeServiceOnEntry = activeService;
activeService.renderPages().then(function () {