Skip to content

How to test a query which returns no result #1236

Closed
@Anthony2539

Description

@Anthony2539

I have just migrated to angularfire2 5.0.0-rc.2.

Before I had this :
const searchHashtag = this.searchHashtag(hashtag);
const subscribe = searchHashtag.subscribe(snapshots=>{ if(snapshots.length > 0){ .... }else{ .... }
and now i replace it by this:
const searchHashtag = this.searchHashtag(hashtag);
const subscribe = searchHashtag.snapshotChanges().subscribe(snapshots=>{ if(snapshots.length > 0){ .... }else{ .... }

But when the searchHashtag return no results, the subscribe are no trigger.
How i can fix it ?

thx

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions