mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 13:17:41 +00:00
GUACAMOLE-348: Only remove download iframe if it's still attached to the DOM.
This commit is contained in:
@@ -224,7 +224,9 @@ angular.module('rest').factory('tunnelService', ['$injector',
|
||||
// ends, in the browser does NOT fire the "load" event for downloads
|
||||
stream.onend = function downloadComplete() {
|
||||
$window.setTimeout(function cleanupIframe() {
|
||||
document.body.removeChild(iframe);
|
||||
if (iframe.parentElement) {
|
||||
document.body.removeChild(iframe);
|
||||
}
|
||||
}, DOWNLOAD_CLEANUP_WAIT);
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user