Skip to content

Commit

Permalink
fix: do not fail if service yaml does not list any apis (#1325)
Browse files Browse the repository at this point in the history
Co-authored-by: gcf-merge-on-green[bot] <60162190+gcf-merge-on-green[bot]@users.noreply.github.com>
  • Loading branch information
1 parent 97763f7 commit 28a980a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion typescript/src/generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ export class Generator {
const info = yaml.load(content) as ServiceYaml;
this.serviceYaml = info;
const serviceMixins = [];
for (let i = 0; i < info.apis.length; i++) {
for (let i = 0; i < info.apis?.length ?? 0; i++) {
const api = info.apis[i];
for (const [, value] of Object.entries(api)) {
serviceMixins.push(value);
Expand Down

0 comments on commit 28a980a

Please sign in to comment.