@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/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);
@@ -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
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bbn/bbn",
3
- "version": "1.0.481",
3
+ "version": "1.0.483",
4
4
  "description": "Javascript toolkit",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",