Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initialize pieces on constructor #520

Merged
merged 2 commits into from Dec 9, 2015
Merged
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.

Always

Just for now

Next

Initialize pieces on constructor

Many prototype functions and properties use it and if it hasn't been initialized it will throw error as it's undefined.
  • Loading branch information
DiegoRBaquero committed Dec 9, 2015
commit efa410dc279bff80f5ab6ffcbcc87279e3737908
@@ -81,8 +81,9 @@ function Torrent (torrentId, opts) {
this.numBlockedPeers = 0
this.files = null
this.done = false

this._amInterested = false
this.pieces = []
this._selections = []
this._critical = []

ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.