@ecency/sdk 1.5.3 → 1.5.4
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/browser/index.js +10 -1
- package/dist/browser/index.js.map +1 -1
- package/dist/node/index.cjs +10 -1
- package/dist/node/index.cjs.map +1 -1
- package/dist/node/index.mjs +10 -1
- package/dist/node/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/browser/index.js
CHANGED
|
@@ -4524,7 +4524,16 @@ async function parseJsonResponse3(response) {
|
|
|
4524
4524
|
error.data = errorData;
|
|
4525
4525
|
throw error;
|
|
4526
4526
|
}
|
|
4527
|
-
|
|
4527
|
+
const text = await response.text();
|
|
4528
|
+
if (!text || text.trim() === "") {
|
|
4529
|
+
return "";
|
|
4530
|
+
}
|
|
4531
|
+
try {
|
|
4532
|
+
return JSON.parse(text);
|
|
4533
|
+
} catch (e) {
|
|
4534
|
+
console.warn("[SDK] Failed to parse JSON response:", e, "Response:", text);
|
|
4535
|
+
return "";
|
|
4536
|
+
}
|
|
4528
4537
|
}
|
|
4529
4538
|
async function signUp(username, email, referral) {
|
|
4530
4539
|
const fetchApi = getBoundFetch();
|