1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Merge pull request #3115 from dmitrylyzo/fix-regresion-3046

Fix regression after PR #3046
This commit is contained in:
Bill Thornton 2021-10-27 00:04:04 -04:00 committed by GitHub
commit ac61612efb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 5 deletions

View file

@ -30,8 +30,9 @@ import globalize from '../scripts/globalize';
options = text;
}
await appRouter.ready();
if (useNativeAlert()) {
await appRouter.ready();
alert(replaceAll(options.text || '', '<br/>', '\n'));
return Promise.resolve();
} else {

View file

@ -35,7 +35,7 @@ async function nativeConfirm(options) {
}
}
function customConfirm(text, title) {
async function customConfirm(text, title) {
let options;
if (typeof text === 'string') {
options = {
@ -62,6 +62,8 @@ function customConfirm(text, title) {
options.buttons = items;
await appRouter.ready();
return dialog.show(options).then(result => {
if (result === 'ok') {
return Promise.resolve();

View file

@ -184,9 +184,7 @@ import '../../assets/css/scrollstyles.scss';
return dlg.getAttribute('data-history') === 'true';
}
export async function open(dlg) {
await appRouter.ready();
export function open(dlg) {
if (globalOnOpenCallback) {
globalOnOpenCallback(dlg);
}