Skip to content

Commit

Permalink
Improved regexp responsible for label extraction in Chrome (#1966)
Browse files Browse the repository at this point in the history
* Updated the regex query

* Add changeset

Co-authored-by: Mateusz Burzyński <[email protected]>
  • Loading branch information
chnakamura and Andarist authored Aug 10, 2020
1 parent b4214b8 commit 4979ebb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/blue-pianos-smell.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@emotion/core": patch
---

Fixed label extraction from the stack traces in Chrome in certain scenarios. This has affected only development builds.
2 changes: 1 addition & 1 deletion packages/core/src/jsx.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ export const jsx: typeof React.createElement = function(
if (error.stack) {
// chrome
let match = error.stack.match(
/at (?:Object\.|)jsx.*\n\s+at ([A-Z][A-Za-z$]+) /
/at (?:Object\.|Module\.|)jsx.*\n\s+at ([A-Z][A-Za-z$]+) /
)
if (!match) {
// safari and firefox
Expand Down

0 comments on commit 4979ebb

Please sign in to comment.