This commit is contained in:
Zalmoxisus 2019-02-07 02:10:24 +02:00
parent 2a3f358002
commit d3fcbb85d9
2 changed files with 13 additions and 11 deletions

View File

@ -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;

View File

@ -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);