8000 Check for undefined in vertical flyout layout function · Issue #7523 · google/blockly · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Check for undefined in vertical flyout layout function #7523
Closed
@rachel-fenichel

Description

@rachel-fenichel

Check for duplicates

  • I have searched for similar issues before opening a new one.

Description

In layout_ in flyout_vertical.ts we access the block with const block = item.block. The result is nullable, so all later uses of block have to have a non-null assertion

To fix:

  • Check whether block is undefined after setting const block = item.block.
  • continue if block doesn't exist.
  • Remove ! from after the remaining uses of block within the for loop.

Related to #7522

To get set up for this issue:

  • Run npm install from the root of the repository.
  • Run npm run build from the root of the repository.
  • Run npm run start from the root of the repository to launch the test playground.

Metadata

Metadata

Assignees

Labels

ghc-osdReserved for open source day: https://anitab-org.github.io/open-source-day/issue: bugDescribes why the code or behaviour is wrong

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0