File tree Expand file tree Collapse file tree
handwritten/firestore/dev Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -344,7 +344,7 @@ export class QueryUtil<
344344 // call to `requestStream()` will backoff should the restart
345345 // fail before delivering any results.
346346 let newQuery : Query < AppModelType , DbModelType > ;
347- if ( ! this . _queryOptions . limit ) {
347+ if ( this . _queryOptions . limit === undefined ) {
348348 newQuery = query ;
349349 } else {
350350 const newLimit =
Original file line number Diff line number Diff line change @@ -1608,7 +1608,7 @@ export class Query<
16081608 structuredQuery . startAt = this . toCursor ( this . _queryOptions . startAt ) ;
16091609 structuredQuery . endAt = this . toCursor ( this . _queryOptions . endAt ) ;
16101610
1611- if ( this . _queryOptions . limit ) {
1611+ if ( this . _queryOptions . limit !== undefined ) {
16121612 structuredQuery . limit = { value : this . _queryOptions . limit } ;
16131613 }
16141614
Original file line number Diff line number Diff line change @@ -1958,9 +1958,6 @@ describe('limit() interface', () => {
19581958 await query . get ( ) ;
19591959 } ) ;
19601960
1961- // Regression test: This test currently fails because limit(0) is not
1962- // serialized in the query proto (limit(0) is falsy in JavaScript).
1963- // This test is expected to fail until the fix is applied.
19641961 it ( 'handles limit(0) correctly' , async ( ) => {
19651962 const overrides : ApiOverride = {
19661963 runQuery : request => {
You can’t perform that action at this time.
0 commit comments