From 2deabb8f2a0c5df80735c712dff911bac4e4d950 Mon Sep 17 00:00:00 2001 From: cigamit Date: Mon, 18 May 2015 21:13:17 -0500 Subject: [PATCH] javascript errors dont throw javascript errors when the href variable is unset --- include/themes/modern/main.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/include/themes/modern/main.js b/include/themes/modern/main.js index 2d6c0accf..e57664d39 100644 --- a/include/themes/modern/main.js +++ b/include/themes/modern/main.js @@ -17,7 +17,10 @@ function themeReady() { /* execute an ajax request to load the data */ href = $(this).attr('href'); - pageName = basename(href); + + if (href != null) { + pageName = basename(href); + } $.get(href, function(html) { var htmlObject = $(html);