ACS-11155: update conditional checks to use optional chaining (#11658)

- Modified several components to use optional chaining for safer property access, enhancing code robustness.
- Updated ESLint configuration to enforce stricter rules on the use of optional chaining.
- Adjusted tests to reflect changes in property access patterns.
This commit is contained in:
Denys Vuika
2026-02-17 09:13:57 +00:00
committed by GitHub
parent 7004f54821
commit 84affe9f37
10 changed files with 22 additions and 22 deletions
+1 -1
View File
@@ -337,7 +337,7 @@ export class SuperagentHttpClient implements HttpClient {
const newParams: { [key: string]: any } = {};
for (const key in params) {
if (Object.prototype.hasOwnProperty.call(params, key) && params[key] !== undefined && params[key] !== null) {
if (Object.prototype.hasOwnProperty.call(params, key) && params[key] != null) {
const value = params[key];
if (SuperagentHttpClient.isFileParam(value) || Array.isArray(value)) {
newParams[key] = value;