This repository was archived by the owner on Mar 29, 2021. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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 } ) ;
Original file line number Diff line number Diff 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 } ;
You can’t perform that action at this time.
0 commit comments