fix(postmessage): improve tab identification logic in _onLoad event#69
Open
hymccord wants to merge 1 commit intowingify:masterfrom
Open
fix(postmessage): improve tab identification logic in _onLoad event#69hymccord wants to merge 1 commit intowingify:masterfrom
hymccord wants to merge 1 commit intowingify:masterfrom
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR fixes tab identification logic in the _onLoad event handler by replacing incorrect array indexing with proper tab lookup by ID. The change ensures that when a child tab sends a LOADED message with its UUID, the parent correctly identifies and updates the specific tab rather than assuming it's the last tab in the array.
- Replaces last-tab assumption with ID-based tab lookup using
arrayUtils.searchByKeyName - Adds null check to prevent errors when the specified tab ID is not found
- Maintains existing tab property updates only when the target tab is successfully located
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
4eb2495 to
36db135
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes: #68