Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

executeControlMethod remove of circular references changes original UI5 Object #275

Closed
dominikfeininger opened this issue Jun 10, 2022 · 0 comments · Fixed by #280
Closed
Assignees

Comments

@dominikfeininger
Copy link
Collaborator

When calling a method on a control the executeControlMethod is used to transfer data from browser to node context. To do so the circular references in the return object need to be removed.

Right now the original ui5 object is manipulated by reference. This can probably cause issues later on in the app and/ or tests.

TODO: don't manipulate e.g use delete <property> on the original object.

vobu added a commit that referenced this issue Jun 19, 2022
- introduce collapseObject for flattening the inheritance Prototype
  this avoids deletion of original object's properties,
  causing unintended side effects
- rm unused window.wdi5...
  - isCyclic
  - removeCyclic
- should fix #275
@vobu vobu closed this as completed in #280 Jun 20, 2022
vobu added a commit that referenced this issue Jun 20, 2022
* wip: try collapsing retrieved ui5 obj

* feat: collapse, avoid cylic

first flatten the retrieved ui5 object,
then clone it, avoiding cylic references

* fix: rm deletes, but collapse

- introduce collapseObject for flattening the inheritance Prototype
  this avoids deletion of original object's properties,
  causing unintended side effects
- rm unused window.wdi5...
  - isCyclic
  - removeCyclic
- should fix #275
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants