Skip to content

Commit 09a85f2

Browse files
authored
Release 1.1.1
1 parent 0081494 commit 09a85f2

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

lib/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@
4242
QueryParams.prototype.get = function (paramName) {
4343
if (paramsMap && paramsMap[paramName]) {
4444
if (paramsMap[paramName].length === 1) {
45-
return JSON.parse(JSON.stringify(paramsMap[paramName][0]));
45+
return JSON.parse(decodeURIComponent(JSON.stringify(paramsMap[paramName][0])));
4646
} else {
47-
return JSON.parse(JSON.stringify(paramsMap[paramName]));
47+
return JSON.parse(decodeURIComponent(JSON.stringify(paramsMap[paramName])));
4848
}
4949
}
5050
return null;
@@ -56,7 +56,7 @@
5656
* The returned value is Immutable i.e. updating the returned values does not affect the actual params in any way.
5757
*/
5858
QueryParams.prototype.getAll = function () {
59-
return JSON.parse(JSON.stringify(paramsMap || null));
59+
return JSON.parse(decodeURIComponent(JSON.stringify(paramsMap || null)));
6060
};
6161

6262
/**

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "js-queryparams",
3-
"version": "1.1.0",
3+
"version": "1.1.1",
44
"description": "A JavaScript library to retrieve the query parameters with cross browser compatibility.",
55
"main": "index.js",
66
"keywords": [

0 commit comments

Comments
 (0)