@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.
- package/package/src/utils.js +7 -4
- package/package.json +1 -1
package/package/src/utils.js
CHANGED
|
@@ -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
|
-
|
|
142
|
-
|
|
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
|
}
|