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

Mitigate error in hoverInspect when entity no longer exists #103

Merged
merged 5 commits into from
Aug 13, 2024

Conversation

Nidoxs
Copy link
Contributor

@Nidoxs Nidoxs commented Aug 10, 2024

Proposed changes

Add a check at the top of the hoverInspect plasma component to see if the world contains the entity id before trying to call _getEntity.

Related issues

Fixes #16.

@jackTabsCode jackTabsCode requested a review from a team August 11, 2024 00:28
Copy link
Contributor

@jackTabsCode jackTabsCode left a comment

Choose a reason for hiding this comment

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

Are we sure we want to return a no-op widget here, rather than handling this higher up in the debugger?

@Nidoxs
Copy link
Contributor Author

Nidoxs commented Aug 11, 2024

Are we sure we want to return a no-op widget here, rather than handling this higher up in the debugger?

This is a fair point, perhaps line 44 of ui.luau may be better?

@Nidoxs
Copy link
Contributor Author

Nidoxs commented Aug 11, 2024

@jackTabsCode I think this is a more appropriate place for the world:contains check.

image

@jackTabsCode jackTabsCode merged commit 1707f1c into matter-ecs:main Aug 13, 2024
6 checks passed
@Nidoxs Nidoxs deleted the highlight-error-fix branch August 14, 2024 14:14
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.

Using the hover inspect feature on an entity as it's being despawned causes an error
2 participants