fix: correct "this" context in getData method

This commit is contained in:
SimonAllen 2025-03-18 21:11:22 +08:00 committed by GitHub
parent c945b03dae
commit 478030f060
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -22,7 +22,7 @@ class DASH extends EventEmitter {
return new Promise((resolve, reject) => {
const task = new Task(url, resolve, range)
task.once('error', err => {
self.emit('error', err)
this.emit('error', err)
})
})
}