fix: Fix exception thrown when `FieldDropdown` subclasses don't have a textual label. by gonfunko · Pull Request #9401 · RaspberryPiFoundation/blockly

The basics

The details

Resolves

Fixes #9400

Proposed Changes

This PR checks for the presence of this.textElement_ before attempting to set ARIA attributes on it in FieldDropdown. The getter it had been using throws if there is no text element, and some FieldDropdown subclasses (namely FieldColour) do not have one, in this particular case because a colour swatch is shown rather than a textual label.