This means that after unbinding every event, a trigger call will return faster, because !(calls = this._callbacks) will evaluate to true.

This commit is contained in:
Justin
2011-11-03 22:30:36 +00:00
parent eec7d2ac14
commit f17747e041

View File

@@ -87,7 +87,7 @@
unbind : function(ev, callback) {
var calls, node, prev;
if (!ev) {
this._callbacks = {};
this._callbacks = null;
} else if (calls = this._callbacks) {
if (!callback) {
calls[ev] = {};