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:
parent
1a0789f7b9
commit
2d97a56f51
5 changed files with 32 additions and 40 deletions
|
@ -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);
|
||||
};
|
||||
}
|
||||
})();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue