Fix setting view type attribute on Tab

Set nothing if there is no current tab and use the correct attribute to
retrieve the current view type.

Closes #13192
This commit is contained in:
Cédric Krier
2024-04-11 19:26:13 +02:00
parent de7bd32700
commit 8d4fd4ebb6
+2 -2
View File
@@ -981,8 +981,8 @@
if (this.switch_callback) {
this.switch_callback();
}
Sao.Tab.set_view_type(
Sao.Tab.tabs.get_current().view_type);
const tab = Sao.Tab.tabs.get_current();
Sao.Tab.set_view_type(tab ? tab.current_view_type : null);
});
};
const set_current_view = () => {