From 73542f286e81e37b22470e8a69eecd8c1c27d56e Mon Sep 17 00:00:00 2001 From: Gautham Warrier Date: Wed, 19 Feb 2014 09:51:19 +0530 Subject: [PATCH] Fix JS issue with script throwing error on Landing Page. --- js/custom.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/js/custom.js b/js/custom.js index 865dbc2..9337237 100644 --- a/js/custom.js +++ b/js/custom.js @@ -22,7 +22,8 @@ $(function () { }); //Fix GitHub Ribbon overlapping Scrollbar -if ($('article')[0].scrollHeight > $('.right-column').height()) $('#github-ribbon')[0].style.right = '16px' +var t = $('#github-ribbon'); +if (t[0] && $('article')[0].scrollHeight > $('.right-column').height()) t[0].style.right = '16px'; //Toggle Code Block Visibility function toggleCodeBlocks() {