From 1b1442e66480c3dbaaa78370eff4eab0f6b14e65 Mon Sep 17 00:00:00 2001 From: j Date: Mon, 16 Sep 2024 17:23:21 +0100 Subject: [PATCH] might not be loaded --- static/js/helpDialog.js | 36 +++++++++++++++++++----------------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/static/js/helpDialog.js b/static/js/helpDialog.js index 53b2497f..97bc51bb 100644 --- a/static/js/helpDialog.js +++ b/static/js/helpDialog.js @@ -137,24 +137,26 @@ pandora.ui.helpDialog = function() { that.select = function(id) { var img, $img; - $text.html(text[id || 'help']).scrollTop(0); - img = $text.find('img'); - if (img) { - $img = $(img); - $img.replaceWith( - $image = Ox.ImageElement( - Ox.extend(getImageSize(), {src: $img.attr('src')}) - ) - .css({borderRadius: '8px'}) - ); + if ($text) { + $text.html(text[id || 'help']).scrollTop(0); + img = $text.find('img'); + if (img) { + $img = $(img); + $img.replaceWith( + $image = Ox.ImageElement( + Ox.extend(getImageSize(), {src: $img.attr('src')}) + ) + .css({borderRadius: '8px'}) + ); + } + $text.find('td:first-child') + .css({ + height: '16px', + paddingRight: '8px', + textAlign: 'right', + whiteSpace: 'nowrap' + }); } - $text.find('td:first-child') - .css({ - height: '16px', - paddingRight: '8px', - textAlign: 'right', - whiteSpace: 'nowrap' - }); return that; }