diff --git a/sao/src/screen.js b/sao/src/screen.js index c5fd89dd68..481bb6b347 100644 --- a/sao/src/screen.js +++ b/sao/src/screen.js @@ -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 = () => {