Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Vladimir Razuvaev <vladimir.razuvaev@gmail.com>
  • Loading branch information
pieh and vladar committed Nov 17, 2020
1 parent afe5352 commit cf4f6dc
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions packages/gatsby/src/services/calculate-dirty-queries.ts
Expand Up @@ -27,17 +27,17 @@ export async function calculateDirtyQueries({
// we want to make sure we run queries for pages that user currently
// view in the browser
if (websocketManager?.activePaths) {
websocketManager.activePaths.forEach(
pagePathFilter.add.bind(pagePathFilter)
)
for (const activePath of websocketManager.activePaths) {
pagePathFilter.add(activePath)
}
}

// we also want to make sure we include pages that were requested from
// via `page-data` fetches or websocket requests
if (currentlyHandledPendingQueryRuns) {
currentlyHandledPendingQueryRuns.forEach(
pagePathFilter.add.bind(pagePathFilter)
)
for (const pendingQuery of currentlyHandledPendingQueryRuns) {
pagePathFilter.add(pendingQuery)
}
}

// static queries are also not on demand
Expand Down

0 comments on commit cf4f6dc

Please sign in to comment.