Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: use optional chaining while processing runtime config #401

Merged
merged 1 commit into from
Aug 23, 2021

Conversation

gosar
Copy link
Contributor

@gosar gosar commented Aug 19, 2021

This is an alternate solution to #391 that works for generic clients too.

Using default value of {} assumed that client configs have no
required properties, which may not be true for generic non-AWS clients
where endpoint may be required.

Using ?. operator for cases where config may be null/undefined.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Using default value of `{}` assumed that client configs have no
required properties, which may not be true for generic non-AWS clients
where endpoint may be required.

Using `?.` operator for cases where `config` may be null/undefined.
@gosar gosar force-pushed the runtimeconfig-chaining branch from c2db246 to 10a5199 Compare August 23, 2021 19:12
@gosar gosar changed the title fix: alternate solution for undefined client config fix: use optional chaining while processing runtime config Aug 23, 2021
@trivikr trivikr merged commit caaac34 into smithy-lang:main Aug 23, 2021
@gosar gosar deleted the runtimeconfig-chaining branch September 1, 2021 17:44
srchase pushed a commit to srchase/smithy-typescript that referenced this pull request Mar 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants