extact url bug when location.search is empty
Showing
1 changed file
with
1 additions
and
1 deletions
@@ -8,7 +8,7 @@ var opt = {}; | @@ -8,7 +8,7 @@ var opt = {}; | ||
8 | 8 | ||
9 | var paramStr = window.location.search.split('?')[1]; | 9 | var paramStr = window.location.search.split('?')[1]; |
10 | 10 | ||
11 | -var keyVal = paramStr.split('&'); | 11 | +var keyVal = paramStr ? paramStr.split('&') : []; |
12 | 12 | ||
13 | var i, key, val; | 13 | var i, key, val; |
14 | 14 |
-
Please register or login to post a comment