Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

"Global code" casing inconsistency聽#40

Copy link
Copy link
@bengourley

Description

@bengourley
Issue body actions

Hi there, first off thanks for an incredible useful collection of modules! 馃憤

Expected Behavior

I would expect StackFrame.functionName to be consistent across browsers.

Current Behavior

The parsed stack from two different browsers (e.g. Safari 11 vs. Edge 14) which originated in the top level of a <script> tag, yields two distinct strings for StackFrame.functionName:

"Global code" (Safari 11) vs "global code" (Edge 14)

Context

I notice that there are test cases for both versions of this string:

expect(stackFrames[4]).toMatchStackFrame(['global code', undefined, 'http://localhost:8080/file.js', 33, 18]);

expect(stackFrames[4]).toMatchStackFrame(['Global code', undefined, 'http://localhost:8080/file.js', 32, 9]);

So I wonder if this is intentional?

Possible Solution

Personally I would like the library to normalize this string such that stacktraces are more consistent between browsers but I want to know if it is intentionally like this.

If you agree that it should be normalized, I'd be happy to supply a pull request.

Cheers!

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.