-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Cover both reported Chrome anonymous function stacktrace lines #294
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cover both reported Chrome anonymous function stacktrace lines #294
Conversation
…ted cases of anonymous functions
gecko = /^\s*(.*?)(?:\((.*?)\))?@((?:file|https?|chrome).*?):(\d+)(?::(\d+))?\s*$/i, | ||
lines = ex.stack.split('\n'), | ||
stack = [], | ||
parts, | ||
element, | ||
func, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure why you added this.
Thought I was missing something obvious. Fixed as per comments. |
@@ -651,7 +651,7 @@ TraceKit.computeStackTrace = (function computeStackTraceWrapper() { | |||
} else if ((parts = chrome.exec(lines[i]))) { | |||
element = { | |||
'url': parts[2], | |||
'func': parts[1] || UNKNOWN_FUNCTION, | |||
'func': (parts[1] || UNKNOWN_FUNCTION), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These added parens are now unnecessary too.
Everything else looks good. :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops!
Awesome. Thanks! 🍰 ✨ |
Cover both reported Chrome anonymous function stacktrace lines
The fix in #290 broke the fix in #238. This PR covers both cases. Not sure if it's the most elegant solution, but it's the best I could do within a limited time frame.