You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.
Awesome addon! However, when used with Rails and response is set with the following:
respond_todo |format|
format.json{head:ok}end
You get an error:
SyntaxError: Unexpected end of input
at Object.parse (native)
at jQuery.parseJSON (http://localhost:4200/assets/vendor.js:7736:14)
at ajaxConvert (http://localhost:4200/assets/vendor.js:8013:19)
at done (http://localhost:4200/assets/vendor.js:8429:15)
at XMLHttpRequest.<anonymous> (http://localhost:4200/assets/vendor.js:8819:9)
However, when you add some actual JSON content to the response, it seems to work fine.
The text was updated successfully, but these errors were encountered:
I ran into this issue yesterday. The reason you are seeing an error is because ember-ajax expects a JSON response by default (see this line), and as a result is attempting to parse the response as JSON.
If you're not returning a JSON response, you should update the dataType attribute to something more appropriate. For possible values, see jQuery's $.ajax() docs for dataType.
Awesome addon! However, when used with Rails and response is set with the following:
You get an error:
However, when you add some actual JSON content to the response, it seems to work fine.
The text was updated successfully, but these errors were encountered: