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

Commit

Permalink
Merge pull request #3288 from ethereum/loki-dupes
Browse files Browse the repository at this point in the history
Prevents duplicate Dynamic View entries
  • Loading branch information
evertonfraga authored Nov 15, 2017
2 parents b986c1b + 6abecb1 commit a8a9b54
Showing 1 changed file with 1 addition and 2 deletions.
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

0 comments on commit a8a9b54

Please sign in to comment.