@flashbacktech/flashbackclient 0.0.50 → 0.0.51
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/api/client.js +2 -1
- package/package.json +1 -1
package/dist/api/client.js
CHANGED
|
@@ -84,7 +84,8 @@ class ApiClient {
|
|
|
84
84
|
headers: this.headers,
|
|
85
85
|
body: data ? JSON.stringify(data) : null,
|
|
86
86
|
};
|
|
87
|
-
const
|
|
87
|
+
const cleanPath = path.startsWith('/') ? path.substring(1) : path;
|
|
88
|
+
const response = await fetch(`${this.baseURL}/${cleanPath}`, options);
|
|
88
89
|
// If response is not ok, handle it before trying to parse JSON
|
|
89
90
|
if (!response.ok) {
|
|
90
91
|
let errorData = null;
|