Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f9d8aed

Browse files
feat: add expo sourcemap support
1 parent 09df27e commit f9d8aed

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

src/utils/XhrNetworkInterceptor.ts

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -158,11 +158,17 @@ export default {
158158
originalXHRSetRequestHeader = XMLHttpRequest.prototype.setRequestHeader;
159159
// An error code that signifies an issue with the RN client.
160160
const clientErrorCode = 9876;
161-
XMLHttpRequest.prototype.open = function (method, url, ...args) {
161+
XMLHttpRequest.prototype.open = function (
162+
method: string,
163+
url: string | URL,
164+
async?: boolean,
165+
username?: string | null,
166+
password?: string | null,
167+
): void {
162168
_reset();
163-
network.url = url;
169+
network.url = url.toString();
164170
network.method = method;
165-
originalXHROpen.apply(this, [method, url, ...args]);
171+
originalXHROpen.call(this, method, url.toString(), async, username, password);
166172
};
167173

168174
XMLHttpRequest.prototype.setRequestHeader = function (header, value) {

0 commit comments

Comments
 (0)