oops actually fix private channels dashboard button this time

pull/88/head
dperolio 3 years ago
parent 3afc7b3ab9
commit d52e82e538

@ -100,9 +100,10 @@ export default class Dashboard extends Builtin {
const { LinkButton } = getModule('LinkButton');
patch('vz-dashboard-private-channels-list-item', ConnectedPrivateChannelsList, 'default', (_, res) => {
try {
if (!res.props?.children) {
if (!res.props?.children?.props?.children) {
return;
}
res.props.children.props.children = [
...res.props.children.props.children.slice(0, 0),
<LinkButton
@ -112,7 +113,7 @@ export default class Dashboard extends Builtin {
selected={vizality.api.routes.getLocation()?.pathname?.startsWith('/vizality')}
onContextMenu={evt => openContextMenu(evt, () => <SettingsContextMenu />)}
/>,
...res.props.children.slice(0)
...res.props.children.props.children.slice(0)
];
} catch (err) {
return this.error(this._labels.concat('_injectPrivateTab'), err);

Loading…
Cancel
Save