@bbn/bbn 1.0.481 → 1.0.483
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bbn.js +1 -1
- package/dist/bbn.js.map +1 -1
- package/dist/com.js +1 -0
- package/dist/fn/ajax/ajax.js +1 -1
- package/package.json +1 -1
package/dist/com.js
CHANGED
|
@@ -53,6 +53,7 @@ const fetchRequest = (method, url, config = {}, aborter) => {
|
|
|
53
53
|
const hasBody = methodsWithBody.includes(method);
|
|
54
54
|
if (config.data != null && hasBody) {
|
|
55
55
|
// You can get fancier here (JSON, FormData, etc.)
|
|
56
|
+
bbn.fn.log('DATA', config.data);
|
|
56
57
|
if (typeof config.data === 'object' && !(config.data instanceof FormData)) {
|
|
57
58
|
fetchConfig.headers.set('Content-Type', 'application/json');
|
|
58
59
|
fetchConfig.body = JSON.stringify(config.data);
|
package/dist/fn/ajax/ajax.js
CHANGED
|
@@ -128,7 +128,7 @@ export default function ajax(url, datatype = null, data = null, success = null,
|
|
|
128
128
|
let method = "get";
|
|
129
129
|
if (isObject(data)) {
|
|
130
130
|
if (numProperties(data) > 0) {
|
|
131
|
-
options.data = data;
|
|
131
|
+
options.data = JSON.stringify(data);
|
|
132
132
|
method = "post";
|
|
133
133
|
}
|
|
134
134
|
}
|