Fix type errors

This commit is contained in:
Mathias Rasmussen
2019-10-07 21:43:38 +02:00
parent 3fbf33b8ae
commit e71555e664
9 changed files with 10 additions and 15 deletions

View File

@@ -279,7 +279,7 @@ module.exports = class TorrentListController {
enabled: torrentSummary.torrentFileName != null
}))
menu.popup(electron.remote.getCurrentWindow())
menu.popup({ window: electron.remote.getCurrentWindow() })
}
// Takes a torrentSummary or torrentKey
@@ -323,7 +323,7 @@ function findFilesRecursive (paths, cb_) {
findFilesRecursive([path], function (fileObjs) {
ret.push(...fileObjs)
if (++numComplete === paths.length) {
ret.sort((a, b) => a.path < b.path ? -1 : a.path > b.path)
ret.sort((a, b) => a.path < b.path ? -1 : Number(a.path > b.path))
cb_(ret)
}
})