From acb50e07521d76a5d0eb272e8203ef40a7975891 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Thu, 24 Oct 2013 13:37:50 +0000 Subject: [PATCH] only scroll if we have position --- static/js/textPanel.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/static/js/textPanel.js b/static/js/textPanel.js index 1817d454..1c28966d 100644 --- a/static/js/textPanel.js +++ b/static/js/textPanel.js @@ -338,7 +338,8 @@ pandora.ui.textHTML = function(text) { }).css({ width: getWidth() + 'px' }); - scrollTo(pandora.user.ui.texts[pandora.user.ui.text].position || 0); + pandora.user.ui.texts[pandora.user.ui.text] && + scrollTo(pandora.user.ui.texts[pandora.user.ui.text].position || 0); return that; };