Remove code smells
This commit is contained in:
parent
d2bd631cbe
commit
d4fbbea991
1 changed files with 1 additions and 1 deletions
|
@ -58,10 +58,10 @@ define(['jQuery', 'emby-checkbox', 'fnchecked'], function ($) {
|
||||||
function save(page) {
|
function save(page) {
|
||||||
var type = getParameterByName('type');
|
var type = getParameterByName('type');
|
||||||
var promise1 = ApiClient.getNamedConfiguration(notificationsConfigurationKey);
|
var promise1 = ApiClient.getNamedConfiguration(notificationsConfigurationKey);
|
||||||
|
// TODO: Check if this promise is really needed, as it's unused.
|
||||||
var promise2 = ApiClient.getJSON(ApiClient.getUrl('Notifications/Types'));
|
var promise2 = ApiClient.getJSON(ApiClient.getUrl('Notifications/Types'));
|
||||||
Promise.all([promise1, promise2]).then(function (responses) {
|
Promise.all([promise1, promise2]).then(function (responses) {
|
||||||
var notificationOptions = responses[0];
|
var notificationOptions = responses[0];
|
||||||
var types = responses[1];
|
|
||||||
var notificationConfig = notificationOptions.Options.filter(function (n) {
|
var notificationConfig = notificationOptions.Options.filter(function (n) {
|
||||||
return n.Type == type;
|
return n.Type == type;
|
||||||
})[0];
|
})[0];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue