Repository: guacamole-client Updated Branches: refs/heads/master 9ee43e656 -> 49c11bbda
GUACAMOLE-348: Only remove download iframe if it's still attached to the DOM. Project: http://git-wip-us.apache.org/repos/asf/guacamole-client/repo Commit: http://git-wip-us.apache.org/repos/asf/guacamole-client/commit/017df40b Tree: http://git-wip-us.apache.org/repos/asf/guacamole-client/tree/017df40b Diff: http://git-wip-us.apache.org/repos/asf/guacamole-client/diff/017df40b Branch: refs/heads/master Commit: 017df40b335a97e447b3821b1acbb3bc7120c180 Parents: 5289774 Author: James Muehlner <james.muehl...@guac-dev.org> Authored: Tue Feb 6 20:11:30 2018 -0800 Committer: James Muehlner <james.muehl...@guac-dev.org> Committed: Tue Feb 6 20:16:58 2018 -0800 ---------------------------------------------------------------------- guacamole/src/main/webapp/app/rest/services/tunnelService.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/017df40b/guacamole/src/main/webapp/app/rest/services/tunnelService.js ---------------------------------------------------------------------- diff --git a/guacamole/src/main/webapp/app/rest/services/tunnelService.js b/guacamole/src/main/webapp/app/rest/services/tunnelService.js index f74088d..c6d5ed4 100644 --- a/guacamole/src/main/webapp/app/rest/services/tunnelService.js +++ b/guacamole/src/main/webapp/app/rest/services/tunnelService.js @@ -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); };