Skip to content

Commit b2fd23a

Browse files
committed
fix(FieldGridDropdown): Fix type error caused by separators
1 parent bbf30fa commit b2fd23a

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

  • plugins/field-grid-dropdown/src

plugins/field-grid-dropdown/src/grid.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* SPDX-License-Identifier: Apache-2.0
55
*/
66

7-
import {utils, browserEvents, MenuOption} from 'blockly/core';
7+
import {utils, browserEvents, MenuOption, FieldDropdown} from 'blockly/core';
88
import {GridItem} from './grid_item';
99

1010
/**
@@ -88,6 +88,9 @@ export class Grid {
8888
private populateItems(options: MenuOption[]) {
8989
let row = document.createElement('div');
9090
for (const [index, item] of options.entries()) {
91+
// TODO(#2507): Don't just ignore separators.
92+
if (item === FieldDropdown.SEPARATOR) continue;
93+
9194
if (index % this.columns === 0) {
9295
row = document.createElement('div');
9396
row.className = 'blocklyFieldGridRow';

0 commit comments

Comments
 (0)