Skip to content

Commit

Permalink
Merge pull request ethereum#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 a55b487 + 433d9d8 commit df9cd0c
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 df9cd0c

Please sign in to comment.