Skip to content

Commit

Permalink
fix: Fixed to match the fix on the Firestore side.
Browse files Browse the repository at this point in the history
  • Loading branch information
mathrunet committed Jan 9, 2024
1 parent 6dc8b84 commit 6fece24
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ class FirestoreModelAdapter extends ModelAdapter
(reference) => reference.count().get(),
),
);
final res = snapshot.fold<int>(0, (p, e) => p + e.count);
final res = snapshot.fold<int>(0, (p, e) => p + (e.count ?? 0));
return res;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ class ListenableFirestoreModelAdapter extends ModelAdapter
query.copyWith(query: query.query.remove(ModelQueryFilterType.limit)),
).map((reference) => reference.count().get()),
);
final res = snapshot.fold<int>(0, (p, e) => p + e.count);
final res = snapshot.fold<int>(0, (p, e) => p + (e.count ?? 0));
return res;
}

Expand Down
30 changes: 15 additions & 15 deletions packages/katana_model_firestore/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -77,26 +77,26 @@ packages:
dependency: "direct main"
description:
name: cloud_firestore
sha256: "50e33a5cd62f7ed0e8290802a7e68e090d27738f65256977162c127303ad82ea"
sha256: "8bfbb5a2edbc6052452326d60de0113fea2bcbf081d34a3f8e45c8b38307b31c"
url: "https://pub.dev"
source: hosted
version: "4.13.5"
version: "4.14.0"
cloud_firestore_platform_interface:
dependency: transitive
description:
name: cloud_firestore_platform_interface
sha256: dedbd776c04429f85726e5cfb6f929d8405da241ceec32baa7d31b7d062dad53
sha256: "73ff438fe46028f0e19f55da18b6ddc6906ab750562cd7d9ffab77ff8c0c4307"
url: "https://pub.dev"
source: hosted
version: "6.0.9"
version: "6.1.0"
cloud_firestore_web:
dependency: transitive
description:
name: cloud_firestore_web
sha256: fd60d31f4eb104295256edc2e0bee631dc2b3283c5087701c513bfa9f27b711a
sha256: "232e45e95970d3a6baab8f50f9c3a6e2838d145d9d91ec9a7392837c44296397"
url: "https://pub.dev"
source: hosted
version: "3.8.9"
version: "3.9.0"
collection:
dependency: transitive
description:
Expand All @@ -117,10 +117,10 @@ packages:
dependency: transitive
description:
name: coverage
sha256: ac86d3abab0f165e4b8f561280ff4e066bceaac83c424dd19f1ae2c2fcd12ca9
sha256: "8acabb8306b57a409bf4c83522065672ee13179297a6bb0cb9ead73948df7c76"
url: "https://pub.dev"
source: hosted
version: "1.7.1"
version: "1.7.2"
crypto:
dependency: transitive
description:
Expand Down Expand Up @@ -278,21 +278,21 @@ packages:
path: "../katana"
relative: true
source: path
version: "2.10.0"
version: "2.10.1"
katana_firebase:
dependency: "direct main"
description:
path: "../katana_firebase"
relative: true
source: path
version: "2.0.30"
version: "2.0.31"
katana_model:
dependency: "direct main"
description:
path: "../katana_model"
relative: true
source: path
version: "2.18.1"
version: "2.18.2"
lints:
dependency: transitive
description:
Expand Down Expand Up @@ -369,10 +369,10 @@ packages:
dependency: transitive
description:
name: plugin_platform_interface
sha256: f4f88d4a900933e7267e2b353594774fc0d07fb072b47eedcd5b54e1ea3269f8
sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02"
url: "https://pub.dev"
source: hosted
version: "2.1.7"
version: "2.1.8"
pointycastle:
dependency: transitive
description:
Expand Down Expand Up @@ -558,10 +558,10 @@ packages:
dependency: transitive
description:
name: uuid
sha256: df5a4d8f22ee4ccd77f8839ac7cb274ebc11ef9adcce8b92be14b797fe889921
sha256: "22c94e5ad1e75f9934b766b53c742572ee2677c56bc871d850a57dad0f82127f"
url: "https://pub.dev"
source: hosted
version: "4.2.1"
version: "4.2.2"
vector_math:
dependency: transitive
description:
Expand Down

0 comments on commit 6fece24

Please sign in to comment.