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

#8273: Fix App crashing when chrome runtime is undefined #8275

Merged

Conversation

johnnymetz
Copy link
Collaborator

@johnnymetz johnnymetz commented Apr 17, 2024

What does this PR do?

Discussion

  • Instead of using optional chaining we could use isExtensionContext(). But @grahamlangford and I decided to use optional chaining because it's simpler. Plus we will delete the src/mv3/api.ts file when the MV3 transition is complete so no need to create a robust solution here.

Demo

https://www.loom.com/share/6884cee3ed74460799897b9c855b318e

Future Work

  • Bump Extension version in App. Will need to go from 1.8.11 -> 1.8.13

Checklist

@johnnymetz johnnymetz self-assigned this Apr 17, 2024
@johnnymetz johnnymetz changed the title #8273: Fix App crashing when chrome runtime is unavailable #8273: Fix App crashing when chrome runtime is undefined Apr 17, 2024
Copy link

codecov bot commented Apr 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 73.54%. Comparing base (8e655e1) to head (7e93a49).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #8275   +/-   ##
=======================================
  Coverage   73.53%   73.54%           
=======================================
  Files        1327     1327           
  Lines       40881    40881           
  Branches     7565     7565           
=======================================
+ Hits        30063    30064    +1     
+ Misses      10818    10817    -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

When the PR is merged, the first loom link found on this PR will be posted to #sprint-demo on Slack. Do not edit this comment manually.

@grahamlangford grahamlangford merged commit d6f09f3 into main Apr 18, 2024
37 checks passed
@grahamlangford grahamlangford deleted the bugfix/8273-fix-app-crash-for-undefined-chrome-runtime branch April 18, 2024 15:06
@grahamlangford grahamlangford added this to the 1.8.13 milestone Apr 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

App crashes on latest Extension version because chrome.runtime is undefined
3 participants