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

Fix error on deleting tab #2571

Merged
merged 1 commit into from May 19, 2020
Merged

Conversation

HiroyasuNishiyama
Copy link
Member

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Proposed changes

Deleting tab (workspace) from following tab information edit panel causes
Uncaught TypeError: Cannot read property 'label' of undefined error.

スクリーンショット 2020-05-19 9 40 24

This seems to be caused by refreshing sidebar of deleted tab on closing panel.

Checklist

  • I have read the contribution guidelines
  • For non-bugfix PRs, I have discussed this change on the forum/slack team.
  • I have run grunt to verify the unit tests pass
  • I have added suitable unit tests to cover the new/changed functionality

@coveralls
Copy link

Coverage Status

Coverage remained the same at 77.525% when pulling 12c9207 on node-red-hitachi:fix-delete-tab into e674d92 on node-red:dev.

@dceejay
Copy link
Member

dceejay commented May 19, 2020

Is this same as fix e674d92 ?

@knolleary
Copy link
Member

@dceejay no - similar looking error, but a different cause. The proposed fix certain stops it. Just want to check its putting the check in the right place.

But both this issue and the fix you refer to highlight the need to add some checks to treeList to prevent it trying to operate on items that are no longer in the tree (thats the common element between the two issues).

@knolleary knolleary merged commit e4b9c6a into node-red:dev May 19, 2020
@knolleary
Copy link
Member

Having merged this, I noticed we were refreshing the info sidebar twice when the edit dialog was closed.

In tracking that down, I found the proper fix for this issue - 1f2c0a7

We should only refresh the sidebar with the workspace if there is nothing else selected in the workspace.

@HiroyasuNishiyama HiroyasuNishiyama deleted the fix-delete-tab branch December 2, 2021 07:04
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

4 participants