badmfck-api-server 5.0.2 → 5.0.3

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.
@@ -595,11 +595,12 @@ class APIService extends BaseService_1.BaseService {
595
595
  checkDataLength(data, result, lvl) {
596
596
  let json = "";
597
597
  try {
598
- json = JSON.stringify(data, (k, v) => {
598
+ const s = JSON.stringify(data, (k, v) => {
599
599
  if (typeof v === 'string' && v.length > 255)
600
600
  return v.slice(0, 255) + `...(${v.length})`;
601
601
  return v;
602
602
  });
603
+ json = typeof s === "string" ? s : "";
603
604
  }
604
605
  catch (e) {
605
606
  json = "[unserializable data]";
@@ -463,4 +463,4 @@ const m3={background:"#a7a7a7",backgroundSelected:"#66bb6a",toggle:"#FFFFFF"},g3
463
463
  <body>
464
464
  <div id="root"></div>
465
465
  </body>
466
- </html>
466
+ </html>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "badmfck-api-server",
3
- "version": "5.0.2",
3
+ "version": "5.0.3",
4
4
  "description": "Simple API http server based on express",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",