Skip to content

count crashes if no node has no children #16

@clibu

Description

@clibu

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
        })
    }

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions