Skip to content

Commit 1655c00

Browse files
Merge pull request #111 from SmythOS/fix/oauth-config-check
Fix OAuth config check for undefined values
2 parents bbf6ca6 + 9a283c4 commit 1655c00

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/core/src/Components/APICall/APICall.class.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ export class APICall extends Component {
115115
let _error: any = undefined;
116116
try {
117117
// To support both old and new OAuth configuration, we check for both oauth_con_id and oauthService.
118-
if ((config?.data?.oauth_con_id !== '' && config?.data?.oauth_con_id !== 'None') || (config?.data?.oauthService !== '' && config.data.oauthService !== 'None')) {
118+
if ((config?.data?.oauth_con_id !== undefined && config?.data?.oauth_con_id !== '' && config?.data?.oauth_con_id !== 'None') || (config?.data?.oauthService !== '' && config.data.oauthService !== 'None')) {
119119
const additionalParams = extractAdditionalParamsForOAuth1(reqConfig);
120120
const oauthHeaders = await generateOAuthHeaders(agent, config, reqConfig, logger, additionalParams);
121121
//reqConfig.headers = { ...reqConfig.headers, ...oauthHeaders };

0 commit comments

Comments
 (0)