Fix type errors
This commit is contained in:
@@ -50,7 +50,5 @@ function onResponse (err, res, data) {
|
||||
title: data.title,
|
||||
message: data.message,
|
||||
detail: data.detail
|
||||
}, noop)
|
||||
})
|
||||
}
|
||||
|
||||
function noop () {}
|
||||
|
||||
@@ -357,8 +357,7 @@ function getMenuTemplate () {
|
||||
type: 'separator'
|
||||
},
|
||||
{
|
||||
role: 'services',
|
||||
submenu: []
|
||||
role: 'services'
|
||||
},
|
||||
{
|
||||
type: 'separator'
|
||||
|
||||
@@ -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()
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
})
|
||||
|
||||
@@ -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 => {
|
||||
|
||||
@@ -551,7 +551,7 @@ function onBlur () {
|
||||
}
|
||||
|
||||
function onVisibilityChange () {
|
||||
state.window.isVisible = !document.webkitHidden
|
||||
state.window.isVisible = !document.hidden
|
||||
}
|
||||
|
||||
function onFullscreenChanged (e, isFullScreen) {
|
||||
|
||||
@@ -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}
|
||||
/>
|
||||
)
|
||||
@@ -497,7 +497,7 @@ function renderPlayerControls (state) {
|
||||
<div
|
||||
key='scrub-bar'
|
||||
className='scrub-bar'
|
||||
draggable='true'
|
||||
draggable
|
||||
onDragStart={handleDragStart}
|
||||
onClick={handleScrub}
|
||||
onDrag={handleScrub}
|
||||
|
||||
Reference in New Issue
Block a user