Skip to content
This repository was archived by the owner on Mar 16, 2021. It is now read-only.
This repository was archived by the owner on Mar 16, 2021. It is now read-only.

A procedure with no labels breaks the floating input box #28

@SheepTester

Description

@SheepTester

image

An error is thrown when trying to sort the block names alphabetically:

chrome-extension://phacniajokfchdcamjhonkbhlcipplno/inject3.js:1631 TypeError: Cannot read property 'localeCompare' of undefined
    at chrome-extension://phacniajokfchdcamjhonkbhlcipplno/inject3.js:1999
    at Array.sort (<anonymous>)
    at buildFloatingFilterList (chrome-extension://phacniajokfchdcamjhonkbhlcipplno/inject3.js:1999)
    at middleClickWorkspace (chrome-extension://phacniajokfchdcamjhonkbhlcipplno/inject3.js:1870)
    at middleClick (chrome-extension://phacniajokfchdcamjhonkbhlcipplno/inject3.js:1887)
    at HTMLDocument.eventMouseDown (chrome-extension://phacniajokfchdcamjhonkbhlcipplno/inject3.js:1629)

options.sort((a, b) => a.desc.localeCompare(b.desc));

This is because the custom block's desc property in options is undefined, so it can't call localeCompare on it. I think it's because in getBlockText, desc is uninitialized, and since there are no text fields on the custom block, desc never gets set to a string and remains undefined.

let desc;

Custom extensions that define blocks that are purely inputs also will break the floating input box, which is how this issue was initially encountered

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions