fix(downloads): Download.run must resolve with self

This commit is contained in:
Ben Gotow 2015-12-09 17:02:42 -08:00
parent 4a2d0a64f6
commit 0ea3aca625

View file

@ -68,9 +68,9 @@ class Download
return if @request return if @request
if @state is State.Finished if @state is State.Finished
resolve() resolve(@) # Note: we must resolve with this
else if @state is State.Failed else if @state is State.Failed
reject() reject(@)
@state = State.Downloading @state = State.Downloading