Make WordPress Core

Ticket #48980: util.js.patch

File util.js.patch, 619 bytes (added by ankitmaru, 5 years ago)
  • src/js/_enqueues/wp/util.js

     
    9494
    9595                        deferred = $.Deferred( function( deferred ) {
    9696                                // Transfer success/error callbacks.
    97                                 if ( options.success )
    98                                         deferred.done( options.success );
    99                                 if ( options.error )
     97                                if ( options.success ) {
     98                                        deferred.done(options.success);
     99                                }
     100                                if ( options.error ){
    100101                                        deferred.fail( options.error );
    101 
     102                                }
    102103                                delete options.success;
    103104                                delete options.error;
    104105