Skip to content

Commit 677ecc3

Browse files
authored
Fix tab name reload for pinned tabs (#1476)
1 parent 1d74e56 commit 677ecc3

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

frontend/wave.ts

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,21 +109,27 @@ async function reinitWave() {
109109
}
110110

111111
function reloadAllWorkspaceTabs(ws: Workspace) {
112-
if (ws == null || ws.tabids == null) {
112+
if (ws == null || (!ws.tabids?.length && !ws.pinnedtabids?.length)) {
113113
return;
114114
}
115-
ws.tabids.forEach((tabid) => {
115+
ws?.tabids.forEach((tabid) => {
116+
WOS.reloadWaveObject<Tab>(WOS.makeORef("tab", tabid));
117+
});
118+
ws?.pinnedtabids?.forEach((tabid) => {
116119
WOS.reloadWaveObject<Tab>(WOS.makeORef("tab", tabid));
117120
});
118121
}
119122

120123
function loadAllWorkspaceTabs(ws: Workspace) {
121-
if (ws == null || ws.tabids == null) {
124+
if (ws == null || (!ws.tabids?.length && !ws.pinnedtabids?.length)) {
122125
return;
123126
}
124127
ws.tabids.forEach((tabid) => {
125128
WOS.getObjectValue<Tab>(WOS.makeORef("tab", tabid));
126129
});
130+
ws.pinnedtabids.forEach((tabid) => {
131+
WOS.getObjectValue<Tab>(WOS.makeORef("tab", tabid));
132+
});
127133
}
128134

129135
async function initWave(initOpts: WaveInitOpts) {

0 commit comments

Comments
 (0)