Javascript error: xhr.responseJSON.forEach is not a function

Created on 16 June 2023, over 1 year ago
Updated 8 August 2023, over 1 year ago

Problem/Motivation

In the browser devtools console there appears this error:

xhr.responseJSON.forEach is not a function .

Is produced by this line of code:

Looks like is expecting always a JSON response but sometimes AJAX responses returns other types of data. For example a plain text.

Proposed resolution

Check the ajax response data type is a JSON.

🐛 Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

🇪🇸Spain omarlopesino

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024