Make WordPress Core

Ticket #25047: 25047.patch

File 25047.patch, 711 bytes (added by evansolomon, 10 years ago)
  • src/wp-includes/js/heartbeat.js

     
    427427                 */
    428428                this.enqueue = function( handle, data, dont_overwrite ) {
    429429                        if ( handle ) {
    430                                 if ( queue.hasOwnProperty( handle ) && dont_overwrite )
     430                                if ( dont_overwrite && queue.isQueued( handle ) )
    431431                                        return false;
    432432
    433433                                queue[handle] = data;
     
    443443                 * $return mixed The data queued with that handle or null
    444444                 */
    445445                this.isQueued = function( handle ) {
     446                        if (! queue.hasOwnProperty( handle ))
     447                                return null;
     448
    446449                        return queue[handle];
    447450                };
    448451        };