Skip to content

Commit c0e682e

Browse files
authored
fix(firebase_database, web): return correct DatabaseReference instance in ThenableReference (#17915)
1 parent 18efadc commit c0e682e

File tree

1 file changed

+3
-2
lines changed
  • packages/firebase_database/firebase_database_web/lib/src/interop

1 file changed

+3
-2
lines changed

packages/firebase_database/firebase_database_web/lib/src/interop/database.dart

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -674,10 +674,11 @@ class ThenableReference extends DatabaseReference {
674674
late final Future<DatabaseReference> _future =
675675
(jsObject as database_interop.ThenableReferenceJsImpl)
676676
.then(((database_interop.ReferenceJsImpl reference) {
677-
DatabaseReference.getInstance(reference);
677+
return reference;
678678
}).toJS)
679679
.toDart
680-
.then((value) => value as DatabaseReference);
680+
.then((value) => DatabaseReference.getInstance(
681+
value as database_interop.ReferenceJsImpl));
681682

682683
/// Creates a new ThenableReference from a [jsObject].
683684
ThenableReference.fromJsObject(

0 commit comments

Comments
 (0)