Fix lint issue

This commit is contained in:
Max Isom 2022-03-19 11:04:20 -04:00
parent 46df0875d5
commit bd0e37e0b8
No known key found for this signature in database
GPG key ID: 25C9B1A7F6798880
3 changed files with 11 additions and 13 deletions

View file

@ -379,6 +379,14 @@ export default class {
this.queue = [];
}
move(from: number, to: number): void {
if (from > this.queueSize() || to > this.queueSize()) {
throw new Error('Move index is outside the range of the queue.');
}
this.queue.splice(this.queuePosition + to, 0, this.queue.splice(this.queuePosition + from, 1)[0]);
}
private getHashForCache(url: string): string {
return hasha(url);
}
@ -554,14 +562,4 @@ export default class {
resolve(returnedStream);
});
}
move(from: number, to: number): void {
if (from > this.queueSize() || to > this.queueSize()){
throw new Error('Move index is outside the range of the queue.' )
}
this.queue.splice( this.queuePosition + to ,0, this.queue.splice(this.queuePosition + from, 1)[0]);
}
}