Angularfire: Observable returns nothing when there is no corresponding list inside firebase database

Created on 5 Oct 2017  路  2Comments  路  Source: angular/angularfire

Before updating to angularfire2 version 5, if there is no corresponding list inisde the database, i will get an blank array back with length: 0.

After updating, if there is no corresponding list inside the database, i will get nothing at all. This means i can't check *ngIf="(list)?.length==0 because there is no array.

It will still listen to change events, and if i add and then remove an object to that list(which means the list doesn't exist inside firebase again), i will then be getting an array with length: 0.

Most helpful comment

Being fixed with #1186! Hold tight!

All 2 comments

Being fixed with #1186! Hold tight!

This seems to be fixed for AFS now, i think James is working on a fix for AFDB #1220, will wait for new commit

Was this page helpful?
0 / 5 - 0 ratings