mirror of
https://github.com/reduxjs/redux-devtools.git
synced 2025-02-21 05:50:50 +03:00
Merge branch 'master' into deps
This commit is contained in:
commit
2fe48fea56
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "redux-devtools-instrument",
|
"name": "redux-devtools-instrument",
|
||||||
"version": "1.9.4",
|
"version": "1.9.6",
|
||||||
"description": "Redux DevTools instrumentation",
|
"description": "Redux DevTools instrumentation",
|
||||||
"main": "lib/instrument.js",
|
"main": "lib/instrument.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|
|
@ -19,6 +19,17 @@ export const ActionTypes = {
|
||||||
PAUSE_RECORDING: 'PAUSE_RECORDING'
|
PAUSE_RECORDING: 'PAUSE_RECORDING'
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const isChrome = (
|
||||||
|
typeof window === 'object' && (
|
||||||
|
typeof window.chrome !== 'undefined' ||
|
||||||
|
typeof window.process !== 'undefined' &&
|
||||||
|
window.process.type === 'renderer'
|
||||||
|
));
|
||||||
|
|
||||||
|
const isChromeOrNode = (
|
||||||
|
isChrome || (typeof process !== 'undefined' && process.release && process.release.name === 'node')
|
||||||
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Action creators to change the History state.
|
* Action creators to change the History state.
|
||||||
*/
|
*/
|
||||||
|
@ -46,7 +57,7 @@ export const ActionCreators = {
|
||||||
} else {
|
} else {
|
||||||
const error = Error();
|
const error = Error();
|
||||||
let prevStackTraceLimit;
|
let prevStackTraceLimit;
|
||||||
if (Error.captureStackTrace) {
|
if (Error.captureStackTrace && isChromeOrNode) { // avoid error-polyfill
|
||||||
if (Error.stackTraceLimit < traceLimit) {
|
if (Error.stackTraceLimit < traceLimit) {
|
||||||
prevStackTraceLimit = Error.stackTraceLimit;
|
prevStackTraceLimit = Error.stackTraceLimit;
|
||||||
Error.stackTraceLimit = traceLimit;
|
Error.stackTraceLimit = traceLimit;
|
||||||
|
@ -144,12 +155,7 @@ function computeWithTryCatch(reducer, action, state) {
|
||||||
nextState = reducer(state, action);
|
nextState = reducer(state, action);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
nextError = err.toString();
|
nextError = err.toString();
|
||||||
if (
|
if (isChrome) {
|
||||||
typeof window === 'object' &&
|
|
||||||
(typeof window.chrome !== 'undefined' ||
|
|
||||||
(typeof window.process !== 'undefined' &&
|
|
||||||
window.process.type === 'renderer'))
|
|
||||||
) {
|
|
||||||
// In Chrome, rethrowing provides better source map support
|
// In Chrome, rethrowing provides better source map support
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
throw err;
|
throw err;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user