React: fix warnings

This commit is contained in:
DC
2016-07-20 13:49:14 -07:00
parent 946bba19a9
commit a4a31d0860
11 changed files with 148 additions and 110 deletions

View File

@@ -82,7 +82,7 @@ function onState (err, _state) {
// a progress bar and to keep the cursor in sync when playing a video
setInterval(update, 1000)
window.requestAnimationFrame(renderIfNecessary)
app = ReactDOM.render(<App state={state} />, document.querySelector('body'))
app = ReactDOM.render(<App state={state} />, document.querySelector('#body'))
// OS integrations:
// ...drag and drop a torrent or video file to play or seed
@@ -240,8 +240,8 @@ const dispatchHandlers = {
// Events from the UI never modify state directly. Instead they call dispatch()
function dispatch (action, ...args) {
// Log dispatch calls, for debugging
if (!['mediaMouseMoved', 'mediaTimeUpdate'].includes(action)) {
// Log dispatch calls, for debugging, but don't spam
if (!['mediaMouseMoved', 'mediaTimeUpdate', 'update'].includes(action)) {
console.log('dispatch: %s %o', action, args)
}