Skip to content

Commit e2ccd5d

Browse files
authored
Merge pull request #23 from ronenst/patch-1
Fix `widelyAvailableOnDate` using the current system month instead of the provided month
2 parents cb452ea + 11ae8fd commit e2ccd5d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/scripts/baseline-browser-versions.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ export function getCompatibleVersions(userOptions?: Options): BrowserVersion[] {
423423

424424
// Sets a cutoff date for feature interoperability 30 months before the stated date
425425
if (options.widelyAvailableOnDate || options.targetYear === undefined) {
426-
targetDate.setMonth(new Date().getMonth() - 30);
426+
targetDate.setMonth(targetDate.getMonth() - 30);
427427
}
428428

429429
let coreBrowserArray = getCoreVersionsByDate(

0 commit comments

Comments
 (0)