Skip to content

Remove attribute from DOM when removing component (through mixin removal/update)#5492

Merged
dmarcos merged 1 commit intoaframevr:masterfrom
mrxz:remove-component-dom
Mar 7, 2024
Merged

Remove attribute from DOM when removing component (through mixin removal/update)#5492
dmarcos merged 1 commit intoaframevr:masterfrom
mrxz:remove-component-dom

Conversation

@mrxz
Copy link
Contributor

@mrxz mrxz commented Mar 7, 2024

Description:
Components on an entity are reflected in the DOM. In case an entities mixins change, some of its components might end up getting removed (a-entity.js#L614-L615). In this case the DOM attribute would remain. This PR ensures that, similar to initComponent the change is reflected in the DOM if not done already.

Changes proposed:

  • Remove DOM attribute in case removeComponent is called without being caused by a removeAttribute call.

@dmarcos
Copy link
Member

dmarcos commented Mar 7, 2024

Thank you!

@dmarcos dmarcos merged commit 555bd47 into aframevr:master Mar 7, 2024
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.

2 participants