Skip to content

Check for undefined in horizontal flyout layout function #7522

@rachel-fenichel

Description

@rachel-fenichel

Check for duplicates

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

Description

In layout_ in flyout_horizontal.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.

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 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

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions