mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-18 03:18:19 -07:00
refactor: Remove nested Promise
This commit is contained in:
parent
270430f6a1
commit
bde869ecb2
@ -39,16 +39,12 @@ class PlaybackPermissionManager {
|
|||||||
return Promise.resolve(true);
|
return Promise.resolve(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
return new Promise((resolve, reject) => {
|
const media = createTestMediaElement();
|
||||||
const media = createTestMediaElement();
|
|
||||||
media.play().then(() => {
|
return media.play()
|
||||||
resolve();
|
.finally(() => {
|
||||||
}).catch((error) => {
|
|
||||||
reject(error);
|
|
||||||
}).finally(() => {
|
|
||||||
destroyTestMediaElement(media);
|
destroyTestMediaElement(media);
|
||||||
});
|
});
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user