Skip to content

Commit

Permalink
fix: PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
BeksOmega committed Nov 8, 2023
1 parent a96cfa0 commit fa0bf80
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions plugins/field-colour/src/field_colour.ts
Original file line number Diff line number Diff line change
Expand Up @@ -216,11 +216,15 @@ export class FieldColour extends Blockly.Field<string> {
if (!block) throw new Blockly.UnattachedFieldError();

const constants = this.getConstants();
return this.blockIsSimpleReporter() && !!constants?.FIELD_COLOUR_FULL_BLOCK;
return (
this.blockIsSimpleReporter() &&
Boolean(constants?.FIELD_COLOUR_FULL_BLOCK)
);
}

/**
* @returns True if this block is a value block with a single editable field.
* @returns True if the source block is a value block with a single editable
* field.
* @internal
*/
blockIsSimpleReporter(): boolean {
Expand Down

0 comments on commit fa0bf80

Please sign in to comment.