From 7202e8be2622740c07273de7cc892ddbc6d2c455 Mon Sep 17 00:00:00 2001 From: Kurtis Seebaldt and Nick Street Date: Wed, 14 Aug 2013 10:43:51 +0100 Subject: [PATCH] Fixed rendering of documentation widgets if no active item on page --- js/application.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/js/application.js b/js/application.js index 359117a4687..9de6d0ff2d9 100644 --- a/js/application.js +++ b/js/application.js @@ -85,6 +85,8 @@ $(function(){ var moveItemSlider = function () { var activeItem = $(".js-item-slider--wrapper .js-item.js-active"); + if (activeItem.empty()) return; + var activeItemPosition = activeItem.position(); var activeItemOffset = activeItemPosition.left; var activeItemWidth = activeItem.outerWidth(); @@ -105,6 +107,8 @@ $(function(){ $(this).siblings().removeClass("js-active"); moveItemSlider(); }); + + new Spring.ProjectDocumentationWidget(); });