Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions packages/react-dev-utils/crashOverlay.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,10 @@

'use strict';

function _interopDefault(ex) {
return ex && typeof ex === 'object' && 'default' in ex ? ex['default'] : ex;
}

var stackFrameParser = require('stack-frame-parser');
var stackFrameMapper = require('stack-frame-mapper');
var stackFrameUnmapper = require('stack-frame-unmapper');
var codeFrame = _interopDefault(require('babel-code-frame'));
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did we need this? If yes, let's just use require('babel-code-frame').default.

Copy link
Contributor

@Timer Timer May 8, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was just an artifact of rollup, so it's fine to remove.
Seems like we don't need the .default.

var codeFrame = require('babel-code-frame');
var ansiHTML = require('./ansiHTML');

var boundErrorHandler = null;
Expand Down Expand Up @@ -157,7 +153,6 @@ function unregisterStackTraceLimit() {
}

var recorded = [];

var errorsConsumed = 0;

function consume(error) {
Expand Down Expand Up @@ -223,6 +218,7 @@ var iframeStyle = {
right: '1em',
width: 'calc(100% - 2em)',
height: 'calc(100% - 2em)',
border: 'none',
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's make sure this fix gets into your crash overlay package PR.

'border-radius': '3px',
'box-shadow': '0 0 6px 0 rgba(0, 0, 0, 0.5)',
'z-index': 1337,
Expand Down Expand Up @@ -628,7 +624,6 @@ function frameDiv(document, functionName, url, internalUrl) {
applyStyles(frameLink, linkStyle);
var frameAnchor = document.createElement('a');
applyStyles(frameAnchor, anchorStyle);
//frameAnchor.href = url
frameAnchor.appendChild(document.createTextNode(cleanedUrl));
frameLink.appendChild(frameAnchor);
frame.appendChild(frameLink);
Expand Down