@@ -1182,13 +1182,14 @@ function onSnapshotDocumentSnapshotBundle<
1182
1182
) : Unsubscribe {
1183
1183
let unsubscribed : boolean = false ;
1184
1184
let internalUnsubscribe : Unsubscribe | undefined ;
1185
- const bundle = json . bundle ;
1186
- const loadTask = loadBundle ( db , bundle ) ;
1185
+ const loadTask = loadBundle ( db , json . bundle ) ;
1187
1186
loadTask
1188
1187
. then ( ( ) => {
1189
- const key = DocumentKey . fromPath ( json . bundleName ) ;
1190
- const docConverter = converter ? converter : null ;
1191
- const docReference = new DocumentReference ( db , docConverter , key ) ;
1188
+ const docReference = new DocumentReference (
1189
+ db ,
1190
+ converter ? converter : null ,
1191
+ DocumentKey . fromPath ( json . bundleName )
1192
+ ) ;
1192
1193
if ( options !== undefined ) {
1193
1194
internalUnsubscribe = onSnapshot (
1194
1195
docReference as DocumentReference < AppModelType , DbModelType > ,
@@ -1205,9 +1206,8 @@ function onSnapshotDocumentSnapshotBundle<
1205
1206
. catch ( e => {
1206
1207
if ( observer . error ) {
1207
1208
observer . error ( e ) ;
1208
- } else {
1209
- throw e ;
1210
1209
}
1210
+ return ( ) => { } ;
1211
1211
} ) ;
1212
1212
return ( ) => {
1213
1213
if ( unsubscribed ) {
@@ -1238,8 +1238,7 @@ function onSnapshotQuerySnapshotBundle<
1238
1238
) : Unsubscribe {
1239
1239
let unsubscribed : boolean = false ;
1240
1240
let internalUnsubscribe : Unsubscribe | undefined ;
1241
- const bundle = json . bundle ;
1242
- const loadTask = loadBundle ( db , bundle ) ;
1241
+ const loadTask = loadBundle ( db , json . bundle ) ;
1243
1242
loadTask
1244
1243
. then ( ( ) => namedQuery ( db , json . bundleName ) )
1245
1244
. then ( query => {
@@ -1265,9 +1264,8 @@ function onSnapshotQuerySnapshotBundle<
1265
1264
. catch ( e => {
1266
1265
if ( observer . error ) {
1267
1266
observer . error ( e ) ;
1268
- } else {
1269
- throw e ;
1270
1267
}
1268
+ return ( ) => { } ;
1271
1269
} ) ;
1272
1270
return ( ) => {
1273
1271
if ( unsubscribed ) {
0 commit comments