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

Description

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.
Custom extensions that define blocks that are purely inputs also will break the floating input box, which is how this issue was initially encountered