Skip to content

Commit

Permalink
remove arrow functions in browser target (#1073)
Browse files Browse the repository at this point in the history
  • Loading branch information
waltjones authored Dec 20, 2022
1 parent f325c46 commit d0e93bd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions sdks/rollbar.js/src/browser/transport/fetch.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ function makeFetchRequest(accessToken, url, method, data, callback, timeout) {

if(_.isFiniteNumber(timeout)) {
controller = new AbortController();
timeoutId = setTimeout(() => controller.abort(), timeout);
timeoutId = setTimeout(function () {controller.abort()}, timeout);
}

fetch(url, {
Expand All @@ -19,14 +19,14 @@ function makeFetchRequest(accessToken, url, method, data, callback, timeout) {
},
body: data,
})
.then((response) => {
.then(function (response) {
if (timeoutId) clearTimeout(timeoutId);
return response.json();
})
.then((data) => {
.then(function (data) {
callback(null, data);
})
.catch((error) => {
.catch(function (error) {
logger.error(error.message);
callback(error);
});
Expand Down

0 comments on commit d0e93bd

Please sign in to comment.