Skip to content

Commit

Permalink
fix: remove correct packages
Browse files Browse the repository at this point in the history
  • Loading branch information
UziTech committed Feb 10, 2020
1 parent ef98676 commit ab1e54b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/sync-settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -474,8 +474,8 @@ Do you want to back up this file anyway?`.trim(),
},

async removeObsoletePackages (packages) {
const installedPackages = this.getPackages().map(p => p.name)
const removePackages = packages.filter(p => !installedPackages.includes(p.name))
const installedPackages = this.getPackages()
const removePackages = installedPackages.filter(i => !packages.find(p => p.name === i.name))
if (removePackages.length === 0) {
atom.notifications.addInfo('Sync-settings: no packages to remove')
return
Expand Down

0 comments on commit ab1e54b

Please sign in to comment.