commit
bfbe69a861
3 changed files with 5 additions and 9 deletions
|
@ -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}
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import React from 'react';
|
||||
import {Icon} from './common.js';
|
||||
|
||||
var requiredFieldWarningStyle = {
|
||||
color: '#cc0000',
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue