Make WordPress Core

Ticket #25047: 25047-2.patch

File 25047-2.patch, 911 bytes (added by azaozz, 13 years ago)
  • 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 && self.isQueued( handle ) )
    431431                                        return false;
    432432
    433433                                queue[handle] = data;
     
    440440                 * Check if data with a particular handle is queued
    441441                 *
    442442                 * $param string handle The handle for the data
    443                  * $return mixed The data queued with that handle or null
     443                 * $return mixed The data queued with that handle or 'false'
    444444                 */
    445445                this.isQueued = function( handle ) {
    446                         return queue[handle];
     446                        if ( queue.hasOwnProperty( handle ) )
     447                                return queue[handle];
     448
     449                        return false;
    447450                };
    448451        };
    449452