Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Commit

Permalink
fix file links and iframe src
Browse files Browse the repository at this point in the history
  • Loading branch information
dcposch committed Nov 12, 2016
1 parent 440694c commit 9f92bf9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion js/webtorrent/components/torrentFileList.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class TorrentFileList extends React.Component {
}

onClick (file) {
window.location = this.props.torrentID + '&ix=' + file.offset
window.location = this.props.torrentID + '&ix=' + this.props.files.indexOf(file)
}

render () {
Expand Down
4 changes: 2 additions & 2 deletions js/webtorrent/entry.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@ class TorrentViewer extends React.Component {

let fileContent
if (state.torrent && ix) {
fileContent = state.server != null
? <iframe src={state.server + '/' + ix} sandbox='allow-same-origin' />
fileContent = state.torrent.serverURL != null
? <iframe src={state.torrent.serverURL + '/' + ix} sandbox='allow-same-origin' />
: <div>Loading...</div>
}

Expand Down

0 comments on commit 9f92bf9

Please sign in to comment.