Skip to content

Commit

Permalink
Fix: #7416 (#7628)
Browse files Browse the repository at this point in the history
  • Loading branch information
Apoorvgarg-creator authored Nov 2, 2023
1 parent 1b49868 commit 9d11767
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions core/field_dropdown.ts
Original file line number Diff line number Diff line change
Expand Up @@ -278,12 +278,8 @@ export class FieldDropdown extends Field<string> {
dom.addClass(menuElement, 'blocklyDropdownMenu');

if (this.getConstants()!.FIELD_DROPDOWN_COLOURED_DIV) {
const primaryColour = block.isShadow()
? block.getParent()!.getColour()
: block.getColour();
const borderColour = block.isShadow()
? (block.getParent() as BlockSvg).style.colourTertiary
: (this.sourceBlock_ as BlockSvg).style.colourTertiary;
const primaryColour = block.getColour();
const borderColour = (this.sourceBlock_ as BlockSvg).style.colourTertiary;
dropDownDiv.setColour(primaryColour, borderColour);
}

Expand Down

0 comments on commit 9d11767

Please sign in to comment.