Make WordPress Core

Ticket #51243: 51243.patch

File 51243.patch, 564 bytes (added by kishanjasani, 5 years ago)

Add patch as @cryptomilk describe in his comment description. Add extra condition to check that the object is exist or not.

  • wp-includes/js/backbone.js

    diff --git a/wp-includes/js/backbone.js b/wp-includes/js/backbone.js
    index 3e09d0dcb0..e55eacbf23 100644
    a b  
    374374  // Cleans up memory bindings between the listener and the listenee.
    375375  Listening.prototype.cleanup = function() {
    376376    delete this.listener._listeningTo[this.obj._listenId];
    377     if (!this.interop) delete this.obj._listeners[this.id];
     377    if (!this.interop && this.obj._listeners) delete this.obj._listeners[this.id];
    378378  };
    379379
    380380  // Aliases for backwards compatibility.