Skip to content

Commit

Permalink
using optional chaining expression
Browse files Browse the repository at this point in the history
  • Loading branch information
D-I-R-M authored Oct 18, 2024
1 parent 25c4e53 commit 0e3a855
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apps/generator/lib/generator.js
Original file line number Diff line number Diff line change
Expand Up @@ -875,7 +875,7 @@ class Generator {
const shouldOverwriteFile = await this.shouldOverwriteFile(relativeTargetFile);
if (!shouldOverwriteFile) return;

if (this.templateConfig.conditionalFiles && this.templateConfig.conditionalFiles[relativeSourceFile]) {
if (this.templateConfig.conditionalFiles?.[relativeSourceFile]) {
const server = this.templateParams.server && asyncapiDocument.servers().get(this.templateParams.server);
const source = jmespath.search({
...asyncapiDocument.json(),
Expand Down

0 comments on commit 0e3a855

Please sign in to comment.