commit | 60c6b1e6e8583926f54fc4bbca44f85bebe31fb5 | [log] [tgz] |
---|---|---|
author | William Hesse <whesse@google.com> | Thu Jan 16 06:00:06 2020 +0000 |
committer | William Hesse <whesse@google.com> | Thu Jan 16 06:00:06 2020 +0000 |
tree | b54f1d19c09f76ec05df11f9d9bf21f248371abf | |
parent | 68ca5718db5336ee30d6a104fc373d925293fd62 [diff] |
[cloud functions] Fix error when a landed CL has no tryjobs TBR: athom@google.com Change-Id: If3ac92b797dcf60c3633e318b9a6ea0921b58fe1 Reviewed-on: https://dart-review.googlesource.com/c/dart_ci/+/131862 Reviewed-by: William Hesse <whesse@google.com>
diff --git a/functions/node/firestore_impl.dart b/functions/node/firestore_impl.dart index 57a1445..a0454dd 100644 --- a/functions/node/firestore_impl.dart +++ b/functions/node/firestore_impl.dart
@@ -313,6 +313,7 @@ .orderBy('number', descending: true) .limit(1) .get(); + if (patchsets.isEmpty) return []; final lastPatchsetGroup = patchsets.documents.first.data.getInt('patchset_group'); QuerySnapshot approvals = await firestore