Skip to content

Commit 5c4c008

Browse files
authoredJul 1, 2020
tests(gatsby): fix feedback tests (#25439)
1 parent 8e4bc92 commit 5c4c008

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed
 

‎packages/gatsby/src/utils/feedback.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,10 @@ export async function userPassesFeedbackRequestHeuristic(): Promise<boolean> {
7676
// received a request from us.
7777
if (lastDateValue) {
7878
const lastDate = new Date(lastDateValue)
79-
const monthsSinceLastRequest = lastDate.getMonth() - new Date().getMonth()
79+
const threeMonthsAgo = new Date()
80+
threeMonthsAgo.setMonth(threeMonthsAgo.getMonth() - 3)
8081

81-
if (monthsSinceLastRequest < 3) {
82+
if (lastDate > threeMonthsAgo) {
8283
return false
8384
}
8485
}

0 commit comments

Comments
 (0)
Please sign in to comment.