Permalink
Browse files

Clean up conditional, remove internal-coupled test

  • Loading branch information...
1 parent c45e310 commit 15959b1224c1cc78303753f3d4afc518e4f6f40a @caseywebdev caseywebdev committed Dec 28, 2012
Showing with 2 additions and 10 deletions.
  1. +2 −1 backbone.js
  2. +0 −9 test/events.js
View
@@ -160,7 +160,8 @@
if (callback || context) {
for (j = 0, k = list.length; j < k; j++) {
ev = list[j];
- if ((callback && callback !== ev.callback._callback && callback !== ev.callback) ||
+ if ((callback && callback !== ev.callback &&
+ callback !== ev.callback._callback) ||
(context && context !== ev.context)) {
events.push(ev);
}
View
@@ -364,13 +364,4 @@ $(document).ready(function() {
_.extend({}, Backbone.Events).once('event').trigger('event');
});
- test("once removes event after running", 1, function() {
- var obj = {};
- _.extend(obj, Backbone.Events);
- obj.once('event', function() {});
- obj.trigger('event');
- console.log(obj._events);
- equal(obj._events['event'].length, 0, 'once should have removed bound event.');
- });
-
});

1 comment on commit 15959b1

@braddunbar
Collaborator

Thanks @caseywebdev!

Please sign in to comment.