[Pkg-javascript-commits] [sockjs-client] 241/434: iframe can be null in a timer

Tonnerre Lombard tonnerre-guest at moszumanska.debian.org
Wed Jan 8 00:47:16 UTC 2014


This is an automated email from the git hooks/post-receive script.

tonnerre-guest pushed a commit to branch master
in repository sockjs-client.

commit c7759ee7c537e910d887a67f5a8f920f53d5663f
Author: Marek Majkowski <majek04 at gmail.com>
Date:   Thu Dec 1 16:57:26 2011 +0000

    iframe can be null in a timer
---
 lib/dom.js | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lib/dom.js b/lib/dom.js
index ee00154..998a4ec 100644
--- a/lib/dom.js
+++ b/lib/dom.js
@@ -198,7 +198,9 @@ utils.createIframe = function (iframe_url, error_callback) {
             // within iframe. Without the timeout it goes straight to
             // onunload.
             setTimeout(function() {
-                iframe.parentNode.removeChild(iframe);
+                if(iframe) {
+                    iframe.parentNode.removeChild(iframe);
+                }
                 iframe = null;
             }, 0);
             utils.detachEvent('unload', cleanup);

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/sockjs-client.git



More information about the Pkg-javascript-commits mailing list