Skip to content

Plugin crashes on startup if collapse toolbar is set to "all" #183

Open
@DraconicMentalist

Description

@DraconicMentalist

Describe the bug
As stated above, the plugin crashes when starting discord if collapse-toolbar is set to 'all'.
It produces this error message:

TypeError: Cannot read properties of null (reading 'querySelector')
    at Object.hide (betterdiscord://plugins/CollapsibleUI.plugin.js:2352:66)
    at Object.init (betterdiscord://plugins/CollapsibleUI.plugin.js:2346:54)
    at eval (betterdiscord://plugins/CollapsibleUI.plugin.js:2407:41)
    at Array.forEach (<anonymous>)
    at Object.init (betterdiscord://plugins/CollapsibleUI.plugin.js:2407:18)
    at CollapsibleUI.initialize (betterdiscord://plugins/CollapsibleUI.plugin.js:2649:12)
    at CollapsibleUI.start (betterdiscord://plugins/CollapsibleUI.plugin.js:2525:10)
    at N.startPlugin (betterdiscord/renderer.js:5:50638)
    at N.startAddon (betterdiscord/renderer.js:5:50431)
    at N.loadAddon (betterdiscord/renderer.js:5:12756)
    at N.loadAddon (betterdiscord/renderer.js:5:47848)
    at N.loadAllAddons (betterdiscord/renderer.js:5:15419)
    at N.initialize (betterdiscord/renderer.js:5:9234)
    at N.initialize (betterdiscord/renderer.js:5:46961)
    at Object.startup (betterdiscord/renderer.js:5:516621) 

The full contents of CollapsibleUIconfig.json in the plugin folder:

{
    "version": "12.0.0",
    "collapse-toolbar": "all"
}

Deleting "collapse-toolbar" from causes the plugin to start normally again, so that seems the likely cause.

To Reproduce
Steps to reproduce the behavior:

  1. Open settings.
  2. Set Collapse Toolbar Settings to "All"
  3. Restart Discord
  4. See that plugin has crashed with the error above.

Expected behavior
The plugin starting normally when enabled.

Desktop (please complete the following information):

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcanaryAn issue that affects Discord Canary but not Stable

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions