Skip to content

Commit

Permalink
Fix type errors
Browse files Browse the repository at this point in the history
  • Loading branch information
mathiasvr committed Oct 9, 2019
1 parent 3fbf33b commit e71555e
Show file tree
Hide file tree
Showing 9 changed files with 10 additions and 15 deletions.
4 changes: 1 addition & 3 deletions src/main/announcement.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,5 @@ function onResponse (err, res, data) {
title: data.title,
message: data.message,
detail: data.detail
}, noop)
})
}

function noop () {}
3 changes: 1 addition & 2 deletions src/main/menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -357,8 +357,7 @@ function getMenuTemplate () {
type: 'separator'
},
{
role: 'services',
submenu: []
role: 'services'
},
{
type: 'separator'
Expand Down
2 changes: 1 addition & 1 deletion src/main/updater.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,6 @@ function initDarwinWin32 () {
(e, notes, name, date, url) => log(`Update downloaded: ${name}: ${url}`)
)

electron.autoUpdater.setFeedURL(AUTO_UPDATE_URL)
electron.autoUpdater.setFeedURL({ url: AUTO_UPDATE_URL })
electron.autoUpdater.checkForUpdates()
}
1 change: 0 additions & 1 deletion src/main/windows/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ function init (state, options) {

const win = main.win = new electron.BrowserWindow({
backgroundColor: '#282828',
backgroundThrottling: false, // do not throttle animations/timers when page is background
darkTheme: true, // Forces dark theme (GTK+3)
height: initialBounds.height,
icon: getIconPath(), // Window icon (Windows, Linux)
Expand Down
1 change: 0 additions & 1 deletion src/main/windows/webtorrent.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ const config = require('../../config')
function init () {
const win = webtorrent.win = new electron.BrowserWindow({
backgroundColor: '#1E1E1E',
backgroundThrottling: false, // do not throttle animations/timers when page is background
center: true,
fullscreen: false,
fullscreenable: false,
Expand Down
4 changes: 2 additions & 2 deletions src/renderer/controllers/torrent-list-controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
}
})
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/lib/torrent-poster.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ function getLargestFileByExtension (torrent, extensions) {
* Filter file on a list extension, can be used to find al image files
* @param torrent Torrent to filter files from
* @param extensions File extensions to filter on
* @returns {number} Array of torrent file objects matching one of the given extensions
* @returns {Array} Array of torrent file objects matching one of the given extensions
*/
function filterOnExtension (torrent, extensions) {
return torrent.files.filter(file => {
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,7 @@ function onBlur () {
}

function onVisibilityChange () {
state.window.isVisible = !document.webkitHidden
state.window.isVisible = !document.hidden
}

function onFullscreenChanged (e, isFullScreen) {
Expand Down
6 changes: 3 additions & 3 deletions src/renderer/pages/player-page.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,9 @@ function renderMedia (state) {
trackTags.push(
<track
key={i}
default={isSelected ? 'default' : ''}
default={isSelected}
label={track.label}
type='subtitles'
kind='subtitles'
src={track.buffer}
/>
)
Expand Down Expand Up @@ -497,7 +497,7 @@ function renderPlayerControls (state) {
<div
key='scrub-bar'
className='scrub-bar'
draggable='true'
draggable
onDragStart={handleDragStart}
onClick={handleScrub}
onDrag={handleScrub}
Expand Down

0 comments on commit e71555e

Please sign in to comment.