mirror of
https://github.com/appy-one/acebase-core.git
synced 2026-05-24 22:01:23 -06:00
[GH-ISSUE #1] Proxyfied array .indexOf issue #2
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/acebase-core#2
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @appy-one on GitHub (Feb 18, 2021).
Original GitHub issue: https://github.com/appy-one/acebase-core/issues/1
Originally assigned to: @appy-one on GitHub.
The
indexOffunction of a proxified array value does not return expected result.Example:
The reason this fails, is because
member1is the proxified version of the object, which is not found in the internal array ofliveChat.members.Current workaround is to use
getTarget()onmember1:Suggested fix: override
indexOfin data-proxy.ts and check if provided value is a Proxy, if so, callgetTarget()on it and pass it on to nativeindexOf.@appy-one commented on GitHub (Feb 19, 2021):
Fixed in v1.0.2