mirror of
https://github.com/reduxjs/redux-devtools.git
synced 2024-11-13 05:06:50 +03:00
Prettify
This commit is contained in:
parent
2a3f358002
commit
d3fcbb85d9
|
@ -19,16 +19,17 @@ export const ActionTypes = {
|
||||||
PAUSE_RECORDING: 'PAUSE_RECORDING'
|
PAUSE_RECORDING: 'PAUSE_RECORDING'
|
||||||
};
|
};
|
||||||
|
|
||||||
const isChrome = (
|
const isChrome =
|
||||||
typeof window === 'object' && (
|
typeof window === 'object' &&
|
||||||
typeof window.chrome !== 'undefined' ||
|
(typeof window.chrome !== 'undefined' ||
|
||||||
typeof window.process !== 'undefined' &&
|
(typeof window.process !== 'undefined' &&
|
||||||
window.process.type === 'renderer'
|
window.process.type === 'renderer'));
|
||||||
));
|
|
||||||
|
|
||||||
const isChromeOrNode = (
|
const isChromeOrNode =
|
||||||
isChrome || (typeof process !== 'undefined' && process.release && process.release.name === 'node')
|
isChrome ||
|
||||||
);
|
(typeof process !== 'undefined' &&
|
||||||
|
process.release &&
|
||||||
|
process.release.name === 'node');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Action creators to change the History state.
|
* Action creators to change the History state.
|
||||||
|
@ -57,7 +58,8 @@ export const ActionCreators = {
|
||||||
} else {
|
} else {
|
||||||
const error = Error();
|
const error = Error();
|
||||||
let prevStackTraceLimit;
|
let prevStackTraceLimit;
|
||||||
if (Error.captureStackTrace && isChromeOrNode) { // avoid error-polyfill
|
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;
|
||||||
|
|
|
@ -9,7 +9,7 @@ const rootStyle = { padding: '5px 10px' };
|
||||||
export default class StackTraceTab extends Component {
|
export default class StackTraceTab extends Component {
|
||||||
static defaultProps = {
|
static defaultProps = {
|
||||||
openFile
|
openFile
|
||||||
}
|
};
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user