Skip to content

Commit a67f90a

Browse files
committed
Release v2.19.2
1 parent fa1b968 commit a67f90a

27 files changed

+143
-87
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Rollbar.js
22

33

4-
[![Build Status](https://travis-ci.org/rollbar/rollbar.js.svg?branch=v2.19.1)](https://travis-ci.org/rollbar/rollbar.js)
4+
[![Build Status](https://travis-ci.org/rollbar/rollbar.js.svg?branch=v2.19.2)](https://travis-ci.org/rollbar/rollbar.js)
55
[![Code Quality: Javascript](https://img.shields.io/lgtm/grade/javascript/g/rollbar/rollbar.js.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/rollbar/rollbar.js/context:javascript)
66
[![Total Alerts](https://img.shields.io/lgtm/alerts/g/rollbar/rollbar.js.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/rollbar/rollbar.js/alerts)
77

dist/rollbar.js

+30-16
Original file line numberDiff line numberDiff line change
@@ -4185,7 +4185,6 @@ function addDiagnosticKeys(item, options, callback) {
41854185

41864186
if (item._isUncaught) {
41874187
diagnostic.is_uncaught = item._isUncaught;
4188-
delete item._isUncaught;
41894188
}
41904189

41914190
if (item.err) {
@@ -4264,6 +4263,7 @@ function checkLevel(item, settings) {
42644263
function userCheckIgnore(logger) {
42654264
return function(item, settings) {
42664265
var isUncaught = !!item._isUncaught;
4266+
delete item._isUncaught;
42674267
var args = item._originalArgs;
42684268
delete item._originalArgs;
42694269
try {
@@ -4429,7 +4429,7 @@ module.exports = {
44294429

44304430

44314431
module.exports = {
4432-
version: '2.19.1',
4432+
version: '2.19.2',
44334433
endpoint: 'api.rollbar.com/api/1/item/',
44344434
logLevel: 'debug',
44354435
reportLevel: 'debug',
@@ -4871,15 +4871,20 @@ Instrumenter.prototype.instrumentNetwork = function() {
48714871
replace(xhrp, 'open', function(orig) {
48724872
return function(method, url) {
48734873
if (_.isType(url, 'string')) {
4874-
this.__rollbar_xhr = {
4875-
method: method,
4876-
url: url,
4877-
status_code: null,
4878-
start_time_ms: _.now(),
4879-
end_time_ms: null
4880-
};
4881-
if (self.autoInstrument.networkRequestHeaders) {
4882-
this.__rollbar_xhr.request_headers = {};
4874+
if (this.__rollbar_xhr) {
4875+
this.__rollbar_xhr.method = method;
4876+
this.__rollbar_xhr.url = url;
4877+
this.__rollbar_xhr.status_code = null;
4878+
this.__rollbar_xhr.start_time_ms = _.now();
4879+
this.__rollbar_xhr.end_time_ms = null;
4880+
} else {
4881+
this.__rollbar_xhr = {
4882+
method: method,
4883+
url: url,
4884+
status_code: null,
4885+
start_time_ms: _.now(),
4886+
end_time_ms: null
4887+
};
48834888
}
48844889
}
48854890
return orig.apply(this, arguments);
@@ -4888,12 +4893,21 @@ Instrumenter.prototype.instrumentNetwork = function() {
48884893

48894894
replace(xhrp, 'setRequestHeader', function(orig) {
48904895
return function(header, value) {
4891-
if (self.autoInstrument.networkRequestHeaders && this.__rollbar_xhr &&
4892-
_.isType(header, 'string') && _.isType(value, 'string')) {
4893-
this.__rollbar_xhr.request_headers[header] = value;
4896+
// If xhr.open is async, __rollbar_xhr may not be initialized yet.
4897+
if (!this.__rollbar_xhr) {
4898+
this.__rollbar_xhr = {};
48944899
}
4895-
if (header.toLowerCase() === 'content-type') {
4896-
this.__rollbar_xhr.request_content_type = value;
4900+
if (_.isType(header, 'string') && _.isType(value, 'string')) {
4901+
if (self.autoInstrument.networkRequestHeaders) {
4902+
if (!this.__rollbar_xhr.request_headers) {
4903+
this.__rollbar_xhr.request_headers = {};
4904+
}
4905+
this.__rollbar_xhr.request_headers[header] = value;
4906+
}
4907+
// We want the content type even if request header telemetry is off.
4908+
if (header.toLowerCase() === 'content-type') {
4909+
this.__rollbar_xhr.request_content_type = value;
4910+
}
48974911
}
48984912
return orig.apply(this, arguments);
48994913
};

dist/rollbar.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/rollbar.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/rollbar.min.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/rollbar.named-amd.js

+30-16
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/rollbar.named-amd.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/rollbar.named-amd.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/rollbar.named-amd.min.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/rollbar.noconflict.umd.js

+30-16
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/rollbar.noconflict.umd.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/rollbar.noconflict.umd.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/rollbar.noconflict.umd.min.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)