We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent be19d1f commit 4afea27Copy full SHA for 4afea27
apps/client/src/widgets/tab_row.ts
@@ -820,12 +820,15 @@ export default class TabRowWidget extends BasicWidget {
820
}
821
822
contextsReopenedEvent({ mainNtxId, tabPosition }: EventData<"contextsReopened">) {
823
- if (!mainNtxId || !tabPosition) {
+ if (!mainNtxId || tabPosition < 0) {
824
// no tab reopened
825
return;
826
827
const tabEl = this.getTabById(mainNtxId)[0];
828
- tabEl.parentNode?.insertBefore(tabEl, this.tabEls[tabPosition]);
+
829
+ if ( tabEl && tabEl.parentNode ){
830
+ tabEl.parentNode.insertBefore(tabEl, this.tabEls[tabPosition]);
831
+ }
832
833
834
updateTabById(ntxId: string | null) {
0 commit comments