Skip to content

Commit 97a18fe

Browse files
author
Prakash Gamit
committed
fix decoding issue
This was happening since it was decoding the url even if its not encoded at all. It will return empty object sometimes, but sometimes it will return object with some random unicode characters as key value pairs. Add if condition to check if the url is encoded or not. If it is encoded then only decode it.
1 parent ac6c7b7 commit 97a18fe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

unbxdSearch.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -561,7 +561,7 @@ var unbxdSearchInit = function(jQuery, Handlebars){
561561
,decodedParamscount = Object.keys(decodedParams).length
562562
,finalParams = null;
563563

564-
if(decodedParamscount > 0){
564+
if(!this.options.noEncoding && decodedParamscount > 0){
565565
finalParams = this._processURL(decodedParams);
566566
}else{
567567
finalParams = this._processURL(urlqueryparams);

0 commit comments

Comments
 (0)