GUACAMOLE-348: Merge changes which ensure the download iframe is removed only if actually present within the DOM.
This commit is contained in:
commit
49c11bbdad
1 file changed
+3
-1
@@ -230,7 +230,9 @@ angular.module('rest').factory('tunnelService', ['$injector',
|
|||||||
// ends, in the browser does NOT fire the "load" event for downloads
|
// ends, in the browser does NOT fire the "load" event for downloads
|
||||||
stream.onend = function downloadComplete() {
|
stream.onend = function downloadComplete() {
|
||||||
$window.setTimeout(function cleanupIframe() {
|
$window.setTimeout(function cleanupIframe() {
|
||||||
document.body.removeChild(iframe);
|
if (iframe.parentElement) {
|
||||||
|
document.body.removeChild(iframe);
|
||||||
|
}
|
||||||
}, DOWNLOAD_CLEANUP_WAIT);
|
}, DOWNLOAD_CLEANUP_WAIT);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user