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

Fix code smells

This commit is contained in:
Bill Thornton 2020-11-25 10:28:41 -05:00
parent 1a0789f7b9
commit 2d97a56f51
5 changed files with 32 additions and 40 deletions

View file

@ -28,7 +28,7 @@ export default (() => {
txtInput.value = options.value || '';
}
function showDialog(options, template) {
function showDialog(options) {
const dialogOptions = {
removeOnClose: true,
scrollY: false
@ -117,15 +117,13 @@ export default (() => {
};
} else {
return options => {
return new Promise((resolve, reject) => {
if (typeof options === 'string') {
options = {
title: '',
text: options
};
}
showDialog(options, template).then(resolve, reject);
});
if (typeof options === 'string') {
options = {
title: '',
text: options
};
}
return showDialog(options);
};
}
})();