diff --git a/main.js b/main.js index 9e57d70f2..05b75c8a5 100644 --- a/main.js +++ b/main.js @@ -506,8 +506,7 @@ startMainWindow = () => { // observe Tabs for changes and refresh menu const Tabs = global.db.getCollection('UI_tabs'); - - const sortedTabs = Tabs.addDynamicView('sorted_tabs'); + const sortedTabs = Tabs.getDynamicView('sorted_tabs') || Tabs.addDynamicView('sorted_tabs'); sortedTabs.applySimpleSort('position', false); const refreshMenu = () => {