@soyio/soyio-rn-sdk 2.0.0 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -131,15 +131,18 @@ function getRedirectUrl(scheme) {
131
131
  }
132
132
  exports.getRedirectUrl = getRedirectUrl;
133
133
  function parseUrlResponseParams(url) {
134
- var regex = /^(\w+):\/\/(\w+)\?(.+)$/;
134
+ var regex = /^([\w-]+):\/\/(\w+)\?(.+)$/;
135
135
  var match = url.match(regex);
136
136
  var requestType = match[2], queryString = match[3];
137
- var params = new URLSearchParams(queryString);
138
137
  var result = {
139
138
  request: requestType,
140
139
  };
141
- params.forEach(function (value, key) {
142
- result[key] = value;
140
+ queryString.split('&').forEach(function (pair) {
141
+ var _a = pair.split('=').map(decodeURIComponent), key = _a[0], rawValue = _a[1];
142
+ if (key) {
143
+ var value = rawValue === 'null' ? null : rawValue;
144
+ result[key] = value;
145
+ }
143
146
  });
144
147
  return result;
145
148
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@soyio/soyio-rn-sdk",
3
- "version": "2.0.0",
3
+ "version": "2.0.1",
4
4
  "license": "MIT",
5
5
  "author": "Ignacio Méndez",
6
6
  "main": "./package/index.js",