@dereekb/firebase 13.1.0 → 13.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.cjs.js CHANGED
@@ -5480,15 +5480,15 @@ function firebaseModelLoader(getFirestoreCollection) {
5480
5480
  /**
5481
5481
  * ArkType schema for a FirestoreModelKey (full path like "collection/12345").
5482
5482
  */
5483
- const firestoreModelKeyType = arktype.type('string > 0').narrow((val, ctx) => isFirestoreModelKey(val) || ctx.mustBe('a valid FirestoreModelKey'));
5483
+ const firestoreModelKeyType = arktype.type('string > 0').narrow((val, ctx) => (val != null && isFirestoreModelKey(val)) || ctx.mustBe('a valid FirestoreModelKey'));
5484
5484
  /**
5485
5485
  * ArkType schema for a FirestoreModelId (document ID like "12345").
5486
5486
  */
5487
- const firestoreModelIdType = arktype.type('string > 0').narrow((val, ctx) => isFirestoreModelId(val) || ctx.mustBe('a valid FirestoreModelId'));
5487
+ const firestoreModelIdType = arktype.type('string > 0').narrow((val, ctx) => (val != null && isFirestoreModelId(val)) || ctx.mustBe('a valid FirestoreModelId'));
5488
5488
  /**
5489
5489
  * ArkType schema for a FirestoreModelId or FirestoreModelKey.
5490
5490
  */
5491
- const firestoreModelIdOrKeyType = arktype.type('string > 0').narrow((val, ctx) => isFirestoreModelIdOrKey(val) || ctx.mustBe('a valid FirestoreModelId or FirestoreModelKey'));
5491
+ const firestoreModelIdOrKeyType = arktype.type('string > 0').narrow((val, ctx) => (val != null && isFirestoreModelIdOrKey(val)) || ctx.mustBe('a valid FirestoreModelId or FirestoreModelKey'));
5492
5492
 
5493
5493
  const targetModelParamsType = arktype.type({
5494
5494
  key: firestoreModelKeyType