esoftplay 0.0.186 → 0.0.187
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/modules/lib/curl.ts +1 -1
- package/package.json +1 -1
package/modules/lib/curl.ts
CHANGED
|
@@ -306,7 +306,7 @@ export default class m {
|
|
|
306
306
|
this.cancelTimeout()
|
|
307
307
|
let resText = await res.text()
|
|
308
308
|
this.resStatus = res.status
|
|
309
|
-
|
|
309
|
+
var resJson = (resText.startsWith("{") || resText.startsWith("[")) ? JSON.parse(resText) : null
|
|
310
310
|
if (resJson) {
|
|
311
311
|
if (onDone) onDone(resJson, false)
|
|
312
312
|
this.onDone(resJson)
|