Skip to content
This repository has been archived by the owner on Sep 5, 2020. It is now read-only.

Prevents duplicate Dynamic View entries #3288

Merged
merged 1 commit into from
Nov 15, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = () => {
Expand Down