Closed pierlon closed 5 years ago
Why wouldn't they be defined?
Do you have a minimal test case that can reproduce the problem?
I've managed to solve the issue. The _listeners
object was on the Collection object. As stated in the change log:
listenTo
uses the listened object's public on method
For context, I am fixing the issue of updating WordPress to v1.4.0.
If a listenee's listeners are not defined, it is unable to delete the listener from the listenee:
https://github.com/jashkenas/backbone/blob/5de45fc9e1cbe5f61cf459067207bbe73451ac91/backbone.js#L377
Checking for the
obj._listeners
object before deleting should fix this. Happy to send a PR if needed :smile: .