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