|
1 |
| -/*! Raven.js 3.1.0 (d781478) | github.com/getsentry/raven-js */ |
| 1 | +/*! Raven.js 3.1.1 (34f456e) | github.com/getsentry/raven-js */ |
2 | 2 |
|
3 | 3 | /*
|
4 | 4 | * Includes TraceKit
|
@@ -150,7 +150,7 @@ Raven.prototype = {
|
150 | 150 | // webpack (using a build step causes webpack #1617). Grunt verifies that
|
151 | 151 | // this value matches package.json during build.
|
152 | 152 | // See: https://github.com/getsentry/raven-js/issues/465
|
153 |
| - VERSION: '3.1.0', |
| 153 | + VERSION: '3.1.1', |
154 | 154 |
|
155 | 155 | debug: false,
|
156 | 156 |
|
@@ -878,8 +878,8 @@ Raven.prototype = {
|
878 | 878 | // to the document. Do this before we instrument addEventListener.
|
879 | 879 | if (this._hasDocument) {
|
880 | 880 | if (document.addEventListener) {
|
881 |
| - document.addEventListener('click', self._breadcrumbEventHandler('click')); |
882 |
| - document.addEventListener('keypress', self._keypressEventHandler()); |
| 881 | + document.addEventListener('click', self._breadcrumbEventHandler('click'), false); |
| 882 | + document.addEventListener('keypress', self._keypressEventHandler(), false); |
883 | 883 | }
|
884 | 884 | else {
|
885 | 885 | // IE8 Compatibility
|
@@ -953,7 +953,13 @@ Raven.prototype = {
|
953 | 953 | }
|
954 | 954 |
|
955 | 955 | // record navigation (URL) changes
|
956 |
| - if ('history' in window && history.pushState) { |
| 956 | + // NOTE: in Chrome App environment, touching history.pushState, *even inside |
| 957 | + // a try/catch block*, will cause Chrome to output an error to console.error |
| 958 | + // borrowed from: https://github.com/angular/angular.js/pull/13945/files |
| 959 | + var chrome = window.chrome; |
| 960 | + var isChromePackagedApp = chrome && chrome.app && chrome.app.runtime; |
| 961 | + var hasPushState = !isChromePackagedApp && window.history && history.pushState; |
| 962 | + if (hasPushState) { |
957 | 963 | // TODO: remove onpopstate handler on uninstall()
|
958 | 964 | var oldOnPopState = window.onpopstate;
|
959 | 965 | window.onpopstate = function () {
|
@@ -1125,10 +1131,7 @@ Raven.prototype = {
|
1125 | 1131 | if (!!this._globalOptions.ignoreErrors.test && this._globalOptions.ignoreErrors.test(message)) return;
|
1126 | 1132 |
|
1127 | 1133 | message += '';
|
1128 |
| - message = truncate(message, this._globalOptions.maxMessageLength); |
1129 |
| - |
1130 | 1134 | fullMessage = (type ? type + ': ' : '') + message;
|
1131 |
| - fullMessage = truncate(fullMessage, this._globalOptions.maxMessageLength); |
1132 | 1135 |
|
1133 | 1136 | if (frames && frames.length) {
|
1134 | 1137 | fileurl = frames[0].filename || fileurl;
|
|
0 commit comments