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

feat: send message to all the valid tabs which has receiving end #2748

Merged
merged 3 commits into from
Sep 11, 2023

Conversation

pavanjoshi914
Copy link
Contributor

Describe the changes you have made in this PR

we query active tabs and iterate over them. if we have the tab that doesn't have the content script for such tab when we do postMessage. the error, receiving end does not exist will be thrown and we will get out of the function. this can lead to not notifying to active tabs

for eg. [tab not having content script, tab having content script]

tab having a content script is in the second place of the array. when we iterate and post message. we will get error for tab present in first position. and hence no notification logic will be executed for tab which is on second position of the array.

solution would be. handle errors inside for loop instead of top level function

image

Link this PR to an issue [optional]

Fixes #ISSUE-NUMBER

Type of change

(Remove other not matching type)

  • fix: Bug fix (non-breaking change which fixes an issue)

Checklist

  • Self-review of changed code
  • Manual testing
  • Added automated tests where applicable
  • Update Docs & Guides
  • For UI-related changes
  • Darkmode
  • Responsive layout

Copy link
Contributor

@rolznz rolznz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tACK

@rolznz rolznz merged commit 9d3b441 into master Sep 11, 2023
5 of 6 checks passed
@rolznz rolznz deleted the events-improvement branch September 11, 2023 09:12
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.

None yet

2 participants