Skip to content
This repository was archived by the owner on Jan 14, 2026. It is now read-only.

Fix crash when no tab is selected in ChannelTabs.onSwitch#186

Open
ClownPEACE wants to merge 1 commit intoaarondoet:masterfrom
ClownPEACE:patch-1
Open

Fix crash when no tab is selected in ChannelTabs.onSwitch#186
ClownPEACE wants to merge 1 commit intoaarondoet:masterfrom
ClownPEACE:patch-1

Conversation

@ClownPEACE
Copy link

This patch fixes a startup crash caused by this.settings.tabs.findIndex(...) returning -1 when no tab is selected.

Accessing .minimized on an undefined tab caused: TypeError: Cannot read properties of undefined (reading 'minimized')

We now check if the index is valid before accessing .minimized, and default to false if not.

This fixes:
sentry.395064ce93b61e02.js:14 [PluginManager] ChannelTabs v2.7.5 could not be started. TypeError: Cannot read properties of undefined (reading 'minimized')

This patch fixes a startup crash caused by `this.settings.tabs.findIndex(...)` returning -1 when no tab is selected. 

Accessing `.minimized` on an undefined tab caused:
TypeError: Cannot read properties of undefined (reading 'minimized')

We now check if the index is valid before accessing `.minimized`, and default to `false` if not.

This fixes:
sentry.395064ce93b61e02.js:14 [PluginManager] ChannelTabs v2.7.5 could not be started. TypeError: Cannot read properties of undefined (reading 'minimized')
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant