From 0c9ea3d3530a5bec2e34d5db65e789b3b8d0056e Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Tue, 5 Nov 2013 14:43:21 -0500 Subject: [PATCH] fixes #578 - Restarting server within plug-in config creates error --- dashboard-ui/scripts/site.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/dashboard-ui/scripts/site.js b/dashboard-ui/scripts/site.js index 466885723..840100d8f 100644 --- a/dashboard-ui/scripts/site.js +++ b/dashboard-ui/scripts/site.js @@ -278,7 +278,15 @@ var Dashboard = { reloadPage: function () { - window.location.href = window.location.href; + var currentUrl = window.location.toString().toLowerCase(); + + // If they're on a plugin config page just go back to the dashboard + // The plugin may not have been loaded yet, or could have been uninstalled + if (currentUrl.indexOf('configurationpage') != -1) { + window.location.href = "dashboard.html"; + } else { + window.location.href = window.location.href; + } }, hideDashboardVersionWarning: function () {