Skip to content
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

Electron: Ensure stripping project root works on paths with spaces #1371

Conversation

bengourley
Copy link
Contributor

Goal

In a renderer stacktrace, paths are URI encoded (so for example a space is the literal %20). The goal of this PR is to fix a bug where the stacktrace (and also the context) showed with a the full, absolute path, rather than the relative path from the project root.

Design

  • decodeURI fits this exact use case

Changeset

Once stackframe.file is confirmed to be a string, pass it through decodeURI before any subsequent processing.

Testing

Tested manually on my mac. Unit tests added.

@github-actions
Copy link

github-actions bot commented Apr 28, 2021

@bugsnag/browser bundle size diff

Minified Minfied + Gzipped
Before 40.87 kB 12.62 kB
After 40.87 kB 12.62 kB
± No change No change

code coverage diff

Coverage values did not change👌.

Total:

Lines Branches Functions Statements
0%(+0%) 0%(+0%) 0%(+0%) 0%(+0%)

Generated by 🚫 dangerJS against 5cd7a94

@bengourley bengourley merged commit c4f54cd into kattrali/add-electron-support Apr 29, 2021
@bengourley bengourley deleted the bengourley/electron-renderer-stackrace-spaces branch April 29, 2021 09:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants