You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: use optional chaining while processing runtime config
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.
Copy file name to clipboardExpand all lines: smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen/RuntimeConfigGenerator.java
Copy file name to clipboardExpand all lines: smithy-typescript-codegen/src/main/resources/software/amazon/smithy/typescript/codegen/runtimeConfig.browser.ts.template
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shar
Copy file name to clipboardExpand all lines: smithy-typescript-codegen/src/main/resources/software/amazon/smithy/typescript/codegen/runtimeConfig.native.ts.template
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ import { getRuntimeConfig as getBrowserRuntimeConfig } from "./runtimeConfig.bro
Copy file name to clipboardExpand all lines: smithy-typescript-codegen/src/main/resources/software/amazon/smithy/typescript/codegen/runtimeConfig.shared.ts.template
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@ import { ${clientConfigName} } from "${clientModuleName}";
Copy file name to clipboardExpand all lines: smithy-typescript-codegen/src/main/resources/software/amazon/smithy/typescript/codegen/runtimeConfig.ts.template
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ import { emitWarningIfUnsupportedVersion } from "@aws-sdk/smithy-client";
Copy file name to clipboardExpand all lines: smithy-typescript-codegen/src/test/java/software/amazon/smithy/typescript/codegen/RuntimeConfigGeneratorTest.java
+16-8Lines changed: 16 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -86,23 +86,29 @@ public Map<String, Consumer<TypeScriptWriter>> getRuntimeConfigWriters(
86
86
87
87
// Does the runtimeConfig.shared.ts file expand the template properties properly?
0 commit comments