Skip to content
This repository was archived by the owner on Mar 29, 2021. It is now read-only.

Commit a7aa383

Browse files
committed
fixing complaints from jshint
1 parent 9379c52 commit a7aa383

2 files changed

Lines changed: 23 additions & 18 deletions

File tree

src/mods/observer.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ idrinth.observer = {
5050
for (var count = 0; count < elements.length; count++) {
5151
handleLink ( elements[count] );
5252
}
53-
;
5453
}
5554
} );
5655
} );

src/mods/raids.js

Lines changed: 23 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -420,26 +420,32 @@ idrinth.raids = {
420420
* @returns {undefined}
421421
*/
422422
var handlePrivates = function() {
423+
/**
424+
*
425+
* @param {String} reply
426+
* @returns {undefined}
427+
*/
428+
var handle = function(reply){
429+
if(!reply) {
430+
return;
431+
}
432+
reply=JSON.parse(reply);
433+
if(!reply) {
434+
return;
435+
}
436+
if(!reply.hasOwnProperty ('delete')) {
437+
idrinth.raids.list[reply.aid] = reply;
438+
}
439+
try{
440+
delete idrinth.raids.private[reply.raidId];
441+
}catch(e) {
442+
idrinth.core.log (e.getMessage?e.getMessage():e.message);
443+
}
444+
};
423445
for(var raidId in idrinth.raids.private) {
424446
idrinth.core.ajax.runHome (
425447
'get-raid-service/'+raidId+'/'+idrinth.raids.private[raidId]+'/',
426-
function(reply){
427-
if(!reply) {
428-
return;
429-
}
430-
reply=JSON.parse(reply);
431-
if(!reply) {
432-
return;
433-
}
434-
if(!reply.hasOwnProperty ('delete')) {
435-
idrinth.raids.list[reply.aid] = reply;
436-
}
437-
try{
438-
delete idrinth.raids.private[reply.raidId];
439-
}catch(e) {
440-
idrinth.core.log (e.getMessage?e.getMessage():e.message);
441-
}
442-
}
448+
handle
443449
);
444450
}
445451
};

0 commit comments

Comments
 (0)