febs-browser
Advanced tools
Comparing version 0.8.19 to 0.8.20
@@ -115,2 +115,6 @@ /** | ||
var element = ctx.headers[key]; | ||
if (key == 'Content-Type' && element === false) { | ||
continue; | ||
} | ||
xhr.setRequestHeader(key, element); | ||
@@ -126,7 +130,10 @@ } | ||
var data_content = ctx.data; | ||
if (data_content && (!ctx.headers || !ctx.headers.hasOwnProperty('Content-Type'))) { | ||
if (data_content) { | ||
if (typeof data_content !== 'string') { | ||
try { | ||
data_content = JSON.stringify(data_content); | ||
xhr.setRequestHeader('Content-Type', 'application/json'); | ||
if (!ctx.headers || !ctx.headers.hasOwnProperty('Content-Type')) { | ||
xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8'); | ||
} | ||
} catch (e) { | ||
@@ -133,0 +140,0 @@ console.log('ajax stringify data error'); |
@@ -74,3 +74,3 @@ { | ||
"name": "febs-browser", | ||
"version": "0.8.19" | ||
"version": "0.8.20" | ||
} |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
2164719
42
22331
2