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,
hidden: React.PropTypes.bool,
deleteChecked: React.PropTypes.bool,
onRemove: React.PropTypes.function,
onRemove: React.PropTypes.func,
},
getInitialState: function() {
return {
@ -191,7 +191,7 @@ export let FileActions = React.createClass({
return (
<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 ?
<div className="button-container">{linkBlock}</div>
: null}

View file

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

View file

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