File tree Expand file tree Collapse file tree 3 files changed +4
-4
lines changed
Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -611,7 +611,7 @@ export class Collection<Schema extends StandardSchemaV1> {
611611 const { take, cursor, skip } = options
612612
613613 invariant (
614- typeof skip !== ' undefined' ? Number . isInteger ( skip ) && skip >= 0 : true ,
614+ skip !== undefined ? Number . isInteger ( skip ) && skip >= 0 : true ,
615615 'Failed to query the collection: expected the "skip" pagination option to be a number larger or equal to 0 but got %j' ,
616616 skip ,
617617 )
Original file line number Diff line number Diff line change @@ -74,7 +74,7 @@ export class Query<T> {
7474 return Object . entries ( condition ) . every ( ( [ key , selector ] ) => {
7575 const actualValue = record [ key ]
7676
77- if ( typeof actualValue === ' undefined' ) {
77+ if ( actualValue === undefined ) {
7878 return false
7979 }
8080
Original file line number Diff line number Diff line change @@ -417,7 +417,7 @@ export abstract class Relation {
417417 returnValue ,
418418 )
419419
420- if ( typeof returnValue !== ' undefined' ) {
420+ if ( returnValue !== undefined ) {
421421 return returnValue
422422 }
423423
@@ -516,7 +516,7 @@ class One extends Relation {
516516 /**
517517 * @note `null` is a valid value for nullable relations.
518518 */
519- if ( typeof record !== ' undefined' ) {
519+ if ( record !== undefined ) {
520520 return record
521521 }
522522 }
You can’t perform that action at this time.
0 commit comments