Initialize reducer with an empty array #16

Closed
hubgit wants to merge 1 commit from patch-1 into main
hubgit commented 2023-07-20 13:35:11 +02:00 (Migrated from github.com)

If the sources array is empty for some reason (unknown but it seems to happen, as we've seen this error logged), avoid a “reduce of empty array with no initial value” error being thrown by initialising the reducer with an empty array.

If the `sources` array is empty for some reason (unknown but it seems to happen, as we've seen this error logged), avoid a “reduce of empty array with no initial value” error being thrown by initialising the reducer with an empty array.
marijnh commented 2023-07-20 17:51:39 +02:00 (Migrated from github.com)

Attached patch should fix the underlying issue that caused that code to run when the linter was no longer actually configured in the state.

Attached patch should fix the underlying issue that caused that code to run when the linter was no longer actually configured in the state.

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
codemirror/lint!16
No description provided.