GoogleChrome / chromium-dashboard

Chrome Status Dashboard
https://www.chromestatus.com
Apache License 2.0
636 stars 363 forks source link

Fix undefined var in early call to render() in provote dialog. #4194

Closed jrobbins closed 1 month ago

jrobbins commented 1 month ago

This should resolve #4172.

An undefined variable was being referenced whenever an API Owner tried to vote Approved on their gate on a stage that also had other pending gates. This triggers the pre-vote dialog to remind them about the need for those other approvals.

Basically, the dialog render() method is called implicitly before the dialog is shown, so that caused an error before the list of gates was set to a defined value. The fix is to make the render code more robust in the case where that variable is undefined.