badmfck-api-server 1.4.6 → 1.4.7
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/apiServer/LogService.js +7 -11
- package/package.json +1 -1
@@ -186,19 +186,15 @@ class LogService extends BaseService_1.BaseService {
|
|
186
186
|
return "undefined";
|
187
187
|
let res = "";
|
188
188
|
if (typeof data === "object") {
|
189
|
-
|
190
|
-
|
189
|
+
try {
|
190
|
+
const tmp = JSON.stringify(data, null, "\t");
|
191
|
+
res = tmp ?? "";
|
191
192
|
}
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
res = tmp ?? "";
|
196
|
-
}
|
197
|
-
catch (e) {
|
198
|
-
res = `${data}`;
|
199
|
-
}
|
193
|
+
catch (e) {
|
194
|
+
if ("toString" in data && data.toString && typeof data.toString === "function")
|
195
|
+
res = data.toString();
|
200
196
|
}
|
201
|
-
if (
|
197
|
+
if (`${data}` === "[object Map]" && "size" in data) {
|
202
198
|
try {
|
203
199
|
const arr = [];
|
204
200
|
for (let i of data)
|