Skip to content

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 join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant