Skip to content

Commit b04d3a7

Browse files
author
Brian Chen
authored
Only check for active targets in GetTargetIds (#5275)
1 parent 4ea4340 commit b04d3a7

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Firestore/core/src/firebase/firestore/remote/remote_event.cc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,9 +200,10 @@ std::vector<TargetId> WatchChangeAggregator::GetTargetIds(
200200
}
201201

202202
std::vector<TargetId> result;
203-
result.reserve(target_states_.size());
204203
for (const auto& entry : target_states_) {
205-
result.push_back(entry.first);
204+
if (IsActiveTarget(entry.first)) {
205+
result.push_back(entry.first);
206+
}
206207
}
207208

208209
return result;

0 commit comments

Comments
 (0)