Merge pull request #135 from lbryio/my-bug-fixes

Minor bug fixes
This commit is contained in:
Job Evers‐Meltzer 2017-01-17 22:15:33 -06:00 committed by GitHub
commit bfbe69a861
3 changed files with 5 additions and 9 deletions

View file

@ -61,7 +61,7 @@ export let FileActions = React.createClass({
path: React.PropTypes.string, path: React.PropTypes.string,
hidden: React.PropTypes.bool, hidden: React.PropTypes.bool,
deleteChecked: React.PropTypes.bool, deleteChecked: React.PropTypes.bool,
onRemove: React.PropTypes.function, onRemove: React.PropTypes.func,
}, },
getInitialState: function() { getInitialState: function() {
return { return {
@ -191,7 +191,7 @@ export let FileActions = React.createClass({
return ( return (
<section className="file-actions"> <section className="file-actions">
{this.props.metadata.content_type.startsWith('video/') ? <WatchLink streamName={this.props.streamName} /> : null} {(this.props.metadata.content_type && this.props.metadata.content_type.startsWith('video/')) ? <WatchLink streamName={this.props.streamName} /> : null}
{this.state.fileInfo !== null || this.state.fileInfo.isMine ? {this.state.fileInfo !== null || this.state.fileInfo.isMine ?
<div className="button-container">{linkBlock}</div> <div className="button-container">{linkBlock}</div>
: null} : null}

View file

@ -1,4 +1,5 @@
import React from 'react'; import React from 'react';
import {Icon} from './common.js';
var requiredFieldWarningStyle = { var requiredFieldWarningStyle = {
color: '#cc0000', color: '#cc0000',

View file

@ -308,12 +308,7 @@ lbry.publish = function(params, fileListedCallback, publishedCallback, errorCall
// lbry.getFilesInfo() during the publish process. // lbry.getFilesInfo() during the publish process.
// Use ES6 named arguments instead of directly passing param dict? // Use ES6 named arguments instead of directly passing param dict?
lbry.call('publish', params, publishedCallback, (errorInfo) => { lbry.call('publish', params, publishedCallback, errorCallback);
errorCallback({
name: fault.fault,
message: fault.faultString,
});
});
if (fileListedCallback) { if (fileListedCallback) {
lbry.getFileInfoWhenListed(params.name, function(fileInfo) { lbry.getFileInfoWhenListed(params.name, function(fileInfo) {
fileListedCallback(fileInfo); fileListedCallback(fileInfo);