Check for params before trying to update params
This commit is contained in:
@@ -65,7 +65,9 @@ export let post_object = async function post_object(
|
||||
|
||||
// Construct the URL with query parameters
|
||||
const url = new URL(endpoint, api_cfg['base_url']);
|
||||
Object.keys(params).forEach(key => url.searchParams.append(key, params[key]));
|
||||
if (params) {
|
||||
Object.keys(params).forEach(key => url.searchParams.append(key, params[key]));
|
||||
}
|
||||
|
||||
// console.log('HERE!! API POST 2');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user