Skip to content

Commit 26fcb59

Browse files
committed
3.24.2
1 parent d92b6a2 commit 26fcb59

22 files changed

+102
-55
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# Changelog
22

3+
## 3.24.2
4+
5+
* FEAT: Capture breadcrumbs on failed fetch request (#1293)
6+
* BUGFIX: Make debug mode actually work (#1305)
7+
* BUGFIX: Use correct frame url in ignore/whitelisturl calls (#1304)
8+
* BUGFIX: Check input type before doing truncation (#1299)
9+
310
## 3.24.1
411

512
* FEAT: Add flag for unhandled promise rejections (#1278)

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "raven-js",
3-
"version": "3.24.1",
3+
"version": "3.24.2",
44
"dependencies": {},
55
"main": "dist/raven.js",
66
"ignore": [

dist/plugins/angular.js

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! Raven.js 3.24.1 (f3b3500) | github.com/getsentry/raven-js */
1+
/*! Raven.js 3.24.2 (d92b6a2) | github.com/getsentry/raven-js */
22

33
/*
44
* Includes TraceKit
@@ -250,7 +250,13 @@ function objectFrozen(obj) {
250250
}
251251

252252
function truncate(str, max) {
253-
return !max || str.length <= max ? str : str.substr(0, max) + '\u2026';
253+
if (typeof max !== 'number') {
254+
throw new Error('2nd argument to `truncate` function should be a number');
255+
}
256+
if (typeof str !== 'string' || max === 0) {
257+
return str;
258+
}
259+
return str.length <= max ? str : str.substr(0, max) + '\u2026';
254260
}
255261

256262
/**
@@ -549,10 +555,9 @@ function jsonSize(value) {
549555
}
550556

551557
function serializeValue(value) {
552-
var maxLength = 40;
553-
554558
if (typeof value === 'string') {
555-
return value.length <= maxLength ? value : value.substr(0, maxLength - 1) + '\u2026';
559+
var maxLength = 40;
560+
return truncate(value, maxLength);
556561
} else if (
557562
typeof value === 'number' ||
558563
typeof value === 'boolean' ||

dist/plugins/angular.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/plugins/angular.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/plugins/console.js

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! Raven.js 3.24.1 (f3b3500) | github.com/getsentry/raven-js */
1+
/*! Raven.js 3.24.2 (d92b6a2) | github.com/getsentry/raven-js */
22

33
/*
44
* Includes TraceKit
@@ -252,7 +252,13 @@ function objectFrozen(obj) {
252252
}
253253

254254
function truncate(str, max) {
255-
return !max || str.length <= max ? str : str.substr(0, max) + '\u2026';
255+
if (typeof max !== 'number') {
256+
throw new Error('2nd argument to `truncate` function should be a number');
257+
}
258+
if (typeof str !== 'string' || max === 0) {
259+
return str;
260+
}
261+
return str.length <= max ? str : str.substr(0, max) + '\u2026';
256262
}
257263

258264
/**
@@ -551,10 +557,9 @@ function jsonSize(value) {
551557
}
552558

553559
function serializeValue(value) {
554-
var maxLength = 40;
555-
556560
if (typeof value === 'string') {
557-
return value.length <= maxLength ? value : value.substr(0, maxLength - 1) + '\u2026';
561+
var maxLength = 40;
562+
return truncate(value, maxLength);
558563
} else if (
559564
typeof value === 'number' ||
560565
typeof value === 'boolean' ||

dist/plugins/console.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/plugins/console.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/plugins/ember.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! Raven.js 3.24.1 (f3b3500) | github.com/getsentry/raven-js */
1+
/*! Raven.js 3.24.2 (d92b6a2) | github.com/getsentry/raven-js */
22

33
/*
44
* Includes TraceKit

dist/plugins/ember.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)