Updates
This commit is contained in:
Vendored
+5
-3
@@ -49,11 +49,11 @@ function fetchApi(url, options) {
|
||||
}
|
||||
}
|
||||
else if (typeof options === "object") {
|
||||
let fetchData;
|
||||
let fetchOptions = {};
|
||||
try {
|
||||
let fetchData;
|
||||
let fetchOptions = {};
|
||||
if (options.method.match(/post|put|delete|patch/i)) {
|
||||
if (options.body && typeof options.body === "object") {
|
||||
if (options.body && typeof options.body == "object") {
|
||||
fetchOptions.body = JSON.stringify(options.body);
|
||||
}
|
||||
}
|
||||
@@ -63,6 +63,8 @@ function fetchApi(url, options) {
|
||||
}
|
||||
catch (error) {
|
||||
console.log("FetchAPI error #2:", error.message);
|
||||
console.log("fetchData =>", fetchData);
|
||||
console.log("fetchOptions =>", fetchOptions);
|
||||
data = null;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user