From 6abecb1fc21dfb39f01dc90240925cd1f38199d6 Mon Sep 17 00:00:00 2001 From: Marc Garreau Date: Tue, 14 Nov 2017 17:53:41 -0700 Subject: [PATCH] Prevents duplicate Dynamic View entries --- main.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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 = () => {