Skip to content

Commit 4979ebb

Browse files
chnakamuraAndarist
andauthored
Improved regexp responsible for label extraction in Chrome (#1966)
* Updated the regex query * Add changeset Co-authored-by: Mateusz Burzyński <mateuszburzynski@gmail.com>
1 parent b4214b8 commit 4979ebb

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

.changeset/blue-pianos-smell.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@emotion/core": patch
3+
---
4+
5+
Fixed label extraction from the stack traces in Chrome in certain scenarios. This has affected only development builds.

packages/core/src/jsx.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ export const jsx: typeof React.createElement = function(
154154
if (error.stack) {
155155
// chrome
156156
let match = error.stack.match(
157-
/at (?:Object\.|)jsx.*\n\s+at ([A-Z][A-Za-z$]+) /
157+
/at (?:Object\.|Module\.|)jsx.*\n\s+at ([A-Z][A-Za-z$]+) /
158158
)
159159
if (!match) {
160160
// safari and firefox

0 commit comments

Comments
 (0)