PagerDuty / backstage-plugin-backend

PagerDuty plugin for Backstage - Backend
https://pagerduty.github.io/backstage-plugin-docs/index.html
Apache License 2.0
3 stars 6 forks source link

fix: handle empty teams array to prevent TypeError #66

Closed MikeSmvl closed 1 month ago

MikeSmvl commented 1 month ago

Description

Ensure the backend handles empty teams arrays gracefully to prevent the PagerDutyPage component from staying in a loading state indefinitely. Updated the code to use optional chaining and nullish coalescing when accessing the team name.

Issue number: #65

Type of change

Checklist

If this is a breaking change ๐Ÿ‘‡

Acknowledgement

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

Disclaimer: We value your time and bandwidth. As such, any pull requests created on non-triaged issues might not be successful.