From 3f59138c66804971cf811e7c8d2994d4b4dab1f6 Mon Sep 17 00:00:00 2001 From: rolux Date: Wed, 6 Jun 2012 16:22:07 +0200 Subject: [PATCH] don't throw JS error when collapsing movies browser before editor has loaded --- static/js/pandora/browser.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/js/pandora/browser.js b/static/js/pandora/browser.js index a20cee3a7..96bdb9bf4 100644 --- a/static/js/pandora/browser.js +++ b/static/js/pandora/browser.js @@ -138,7 +138,7 @@ pandora.ui.browser = function() { if (data.collapsed) { // fixme: can we do this for timeline and player too? if (pandora.user.ui.itemView == 'editor') { - pandora.$ui.editor.gainFocus(); + pandora.$ui.editor && pandora.$ui.editor.gainFocus(); } } if (pandora.user.ui.itemView == 'timeline') {