mirror of
https://github.com/BluemediaDev/muse.git
synced 2025-06-27 09:12:43 +02:00
remove items destruturing
This commit is contained in:
parent
8be58920ba
commit
0bc39279a5
1 changed files with 3 additions and 3 deletions
|
@ -74,7 +74,7 @@ export default class {
|
|||
}
|
||||
|
||||
async search(query: string, shouldSplitChapters: boolean): Promise<SongMetadata[]> {
|
||||
const {items}: ytsr.VideoResult | void = await this.ytsrQueue.add<ytsr.VideoResult>(async () => this.cache.wrap(
|
||||
const result = await this.ytsrQueue.add<ytsr.VideoResult>(async () => this.cache.wrap(
|
||||
ytsr,
|
||||
query,
|
||||
{
|
||||
|
@ -85,13 +85,13 @@ export default class {
|
|||
},
|
||||
));
|
||||
|
||||
if (!items) {
|
||||
if (result === undefined) {
|
||||
return [];
|
||||
}
|
||||
|
||||
let firstVideo: Video | undefined;
|
||||
|
||||
for (const item of items) {
|
||||
for (const item of result.items) {
|
||||
if (item.type === 'video') {
|
||||
firstVideo = item;
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue