Check for params before trying to update params

This commit is contained in:
Scott Idem
2025-05-19 17:25:02 -04:00
parent 9af5c960f7
commit 2976d618f8
2 changed files with 4 additions and 2 deletions

View File

@@ -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');