From 20d784f6f8b389bd86cf86a7fdcfd1769ab9ec27 Mon Sep 17 00:00:00 2001 From: Chris Hallberg <crhallberg@gmail.com> Date: Mon, 10 Aug 2015 14:33:09 -0400 Subject: [PATCH] deparam js fix: return empty array when no parameters exist in URL. --- themes/bootstrap3/js/common.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/themes/bootstrap3/js/common.js b/themes/bootstrap3/js/common.js index 2bab168d847..63cc5a345fc 100644 --- a/themes/bootstrap3/js/common.js +++ b/themes/bootstrap3/js/common.js @@ -50,6 +50,9 @@ function html_entity_decode(string, quote_style) // Turn GET string into array function deparam(url) { + if(!url.match(/\?/)) { + return []; + } var request = {}; var pairs = url.substring(url.indexOf('?') + 1).split('&'); for (var i = 0; i < pairs.length; i++) { -- GitLab