Skip to content

Commit afd776f

Browse files
committed
Add check for invalid budger alerts
1 parent 01723c9 commit afd776f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/SpeedTracker.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ SpeedTracker.prototype._processBudgets = function (profileData, result) {
8282
infractionType = 'min'
8383
}
8484

85-
if (infractionType) {
85+
if (infractionType && (budget.alerts instanceof Array)) {
8686
budget.alerts.forEach(alertName => {
8787
infractorsByAlert[alertName] = infractorsByAlert[alertName] || []
8888

0 commit comments

Comments
 (0)