Merge pull request #37 from jfurrow/bug/destination-undefined

Fix destination undefined bug
This commit is contained in:
John Furrow
2016-06-18 15:30:00 -07:00
committed by GitHub
2 changed files with 5 additions and 1 deletions
@@ -8,6 +8,7 @@ import Close from '../icons/Close';
import File from '../icons/File';
import Files from '../icons/Files';
import ModalActions from './ModalActions';
import SettingsStore from '../../stores/SettingsStore';
import TorrentActions from '../../actions/TorrentActions';
const METHODS_TO_BIND = [
@@ -23,6 +24,7 @@ export default class AddTorrentsByFile extends React.Component {
super();
this.state = {
destination: SettingsStore.getFloodSettings('torrentDestination'),
isAddingTorrents: false,
files: null
};
@@ -2,6 +2,7 @@ import React from 'react';
import AddTorrentsActions from './AddTorrentsActions';
import AddTorrentsDestination from './AddTorrentsDestination';
import SettingsStore from '../../stores/SettingsStore';
import TextboxRepeater from '../forms/TextboxRepeater';
import TorrentActions from '../../actions/TorrentActions';
@@ -20,7 +21,7 @@ export default class AddTorrentsByURL extends React.Component {
this.state = {
addTorrentsError: null,
destination: '',
destination: SettingsStore.getFloodSettings('torrentDestination'),
isAddingTorrents: false,
urlTextboxes: [{value: ''}],
startTorrents: true
@@ -34,6 +35,7 @@ export default class AddTorrentsByURL extends React.Component {
handleAddTorrents() {
this.setState({isAddingTorrents: true});
let torrentURLs = _.map(this.state.urlTextboxes, 'value');
TorrentActions.addTorrentsByUrls({
urls: torrentURLs,
destination: this.state.destination,