A platform for community discussion. Free, open, simple.
DEV: Fix another form of sending data in ember-cli (#15079)
Jarek Radosz9380c1273edd
diff --git a/app/assets/javascripts/discourse/lib/bootstrap-json/index.js b/app/assets/javascripts/discourse/lib/bootstrap-json/index.jsindex 1938ddc0f14..23e401e413b 100644--- a/app/assets/javascripts/discourse/lib/bootstrap-json/index.js+++ b/app/assets/javascripts/discourse/lib/bootstrap-json/index.js@@ -317,16 +317,15 @@ to serve API requests. For example:return true;}- if (- request.get("Content-Type") &&- request.get("Content-Type").includes("application/x-www-form-urlencoded")- ) {- return true;+ const contentType = request.get("Content-Type");+ if (!contentType) {+ return false;}if (- request.get("Content-Type") &&- request.get("Content-Type").includes("multipart/form-data")+ contentType.includes("application/x-www-form-urlencoded") ||+ contentType.includes("multipart/form-data") ||+ contentType.includes("application/json")) {return true;}