[GH-ISSUE #16] count crashes if no node has no children #17

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

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

Originally assigned to: @appy-one on GitHub.

db.ref('songs').count(); will raise an exception if the 'songs' node has no children.

data-reference.ts

    count() {
        return this.reflect("info", { child_count: true })
        .then(info => {
            return info.children.count;  <<<-- HERE
        })
    }
Originally created by @clibu on GitHub (Mar 4, 2021). Original GitHub issue: https://github.com/appy-one/acebase/issues/16 Originally assigned to: @appy-one on GitHub. ```db.ref('songs').count();``` will raise an exception if the 'songs' node has no children. data-reference.ts ```` count() { return this.reflect("info", { child_count: true }) .then(info => { return info.children.count; <<<-- HERE }) } ````
gitea-mirror 2026-05-23 08:25:33 -06:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

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

Fix published in version 1.1.4

<!-- gh-comment-id:790445871 --> @appy-one commented on GitHub (Mar 4, 2021): Fix published in version 1.1.4
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#17
No description provided.