@@ -1095,21 +1095,16 @@ function onSnapshotBundle<AppModelType, DbModelType extends DocumentData>(
10951095) : Unsubscribe {
10961096 const db = getModularInstance ( reference ) ;
10971097 let curArg = 0 ;
1098- console . error ( "DEDB json args: " , args [ curArg ] as object ) ;
1099- const snapshotJson = normalizeSnapshotJsonFields ( args [ curArg ] as object ) ;
1100- console . error ( "DEDB parsed snapshotJson: " , snapshotJson ) ;
1101- console . error ( "DEDB parsed bundleSource: " , snapshotJson . bundleSource ) ;
1098+ const snapshotJson = normalizeSnapshotJsonFields ( args [ curArg ++ ] as object ) ;
11021099 if ( snapshotJson . error ) {
11031100 throw new FirestoreError ( Code . INVALID_ARGUMENT , snapshotJson . error ) ;
11041101 }
1105- curArg ++ ;
11061102 let options : SnapshotListenOptions | undefined = undefined ;
11071103 if ( typeof args [ curArg ] === 'object' && ! isPartialObserver ( args [ curArg ] ) ) {
11081104 options = args [ curArg ++ ] as SnapshotListenOptions ;
11091105 }
11101106
1111- if ( snapshotJson . bundleSource === "QuerySnapshot" ) {
1112- console . error ( "DEDB QuerySnapshot, snapshotJson.bundleSource: " , snapshotJson . bundleSource ) ;
1107+ if ( snapshotJson . bundleSource === 'QuerySnapshot' ) {
11131108 let observer : {
11141109 next : ( snapshot : QuerySnapshot < AppModelType , DbModelType > ) => void ;
11151110 error ?: ( error : FirestoreError ) => void ;
@@ -1140,8 +1135,7 @@ function onSnapshotBundle<AppModelType, DbModelType extends DocumentData>(
11401135 observer ! ,
11411136 args [ curArg ] as FirestoreDataConverter < DbModelType >
11421137 ) ;
1143- } else if ( snapshotJson . bundleSource === "DocumentSnapshot" ) {
1144- console . error ( "DEDB DocumentSnapshot snapshotJson.bundleSource" , snapshotJson . bundleSource ) ;
1138+ } else if ( snapshotJson . bundleSource === 'DocumentSnapshot' ) {
11451139 let observer : {
11461140 next : ( snapshot : DocumentSnapshot < AppModelType , DbModelType > ) => void ;
11471141 error ?: ( error : FirestoreError ) => void ;
@@ -1173,7 +1167,6 @@ function onSnapshotBundle<AppModelType, DbModelType extends DocumentData>(
11731167 args [ curArg ] as FirestoreDataConverter < DbModelType >
11741168 ) ;
11751169 } else {
1176- console . error ( "DEDB other, bundleSource : " , snapshotJson . bundleSource ) ;
11771170 throw new FirestoreError (
11781171 Code . INVALID_ARGUMENT ,
11791172 `unsupported bundle source: ${ snapshotJson . bundleSource } `
@@ -1225,16 +1218,14 @@ function normalizeSnapshotJsonFields(snapshotJson: object): {
12251218 result . error = `snapshotJson field '${ key } ' cannot be an empty string.` ;
12261219 break ;
12271220 }
1228- console . error ( "DEDB setting key: \"" + key + "\" value: \"" + value + "\"" ) ;
12291221 if ( key === 'bundle' ) {
1230- result . bundle = value ; // No assertion needed, TS knows 'bundle' is a key
1222+ result . bundle = value ;
12311223 } else if ( key === 'bundleName' ) {
1232- result . bundleName = value ; // No assertion needed
1224+ result . bundleName = value ;
12331225 } else if ( key === 'bundleSource' ) {
1234- result . bundleSource = value ; // No assertion needed
1226+ result . bundleSource = value ;
12351227 }
12361228 }
1237- console . error ( "DEDB returning result.bundleSource: " , result . bundleSource , " result.error: " , result . error ) ;
12381229 return result ;
12391230}
12401231
0 commit comments