[GH-ISSUE #18] Child events on arrays are fired on incorrect paths #16

Closed
opened 2026-05-23 08:25:33 -06:00 by gitea-mirror · 1 comment
Owner

Originally created by @appy-one on GitHub (Mar 10, 2021).
Original GitHub issue: https://github.com/appy-one/acebase/issues/18

Originally assigned to: @appy-one on GitHub.

If child events are bound to a path that is an array, the references in the callbacks will contain the wrong child paths

Example:

// Add subscription:
db.ref('chats/chat1/members_array').on('child_added', ref => {
   console.log(ref.path); // "chats/chat1/members_array/2" instead of "chats/chat1/members_array[2]"
});
Originally created by @appy-one on GitHub (Mar 10, 2021). Original GitHub issue: https://github.com/appy-one/acebase/issues/18 Originally assigned to: @appy-one on GitHub. If child events are bound to a path that is an array, the references in the callbacks will contain the wrong child paths Example: ```js // Add subscription: db.ref('chats/chat1/members_array').on('child_added', ref => { console.log(ref.path); // "chats/chat1/members_array/2" instead of "chats/chat1/members_array[2]" }); ```
gitea-mirror added the
bug
label 2026-05-23 08:25:33 -06:00
Author
Owner

@appy-one commented on GitHub (Mar 10, 2021):

Fix published in v1.2.1

<!-- gh-comment-id:795400152 --> @appy-one commented on GitHub (Mar 10, 2021): Fix published in v1.2.1
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/acebase#16
No description provided.