Skip to content

Commit

Permalink
Merge pull request #5 from Willyham/master
Browse files Browse the repository at this point in the history
Upgrade to Backbone 1.1.2 and support execute function
  • Loading branch information
chirag04 committed Mar 28, 2014
2 parents 6703ca0 + 7bea7c1 commit fe77504
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 8 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
.DS_Store
*.log
*.iml
node_modules
node_modules
bower_components
1 change: 0 additions & 1 deletion backbone-async-route-filter-min.js

This file was deleted.

4 changes: 2 additions & 2 deletions backbone-async-route-filter.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,15 @@
next(stack, runRoute);
}
} else if(runRoute) {
callback.apply(router, args);
router.execute(callback, args);
}
}

// reset the stack coutner for before filters
index = 0;
// start with top of the before stack
next(beforeStack, true);

router.trigger.apply(router, ['route:' + name].concat(args));
router.trigger('route', name, args);
Backbone.history.trigger('route', router, name, args);
Expand Down
4 changes: 2 additions & 2 deletions backbone-route-filter-amd.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,15 @@ define(['backbone'], function(Backbone){
next(stack, runRoute);
}
} else if(runRoute) {
callback.apply(router, args);
router.execute(callback, args);
}
}

// reset the stack coutner for before filters
index = 0;
// start with top of the before stack
next(beforeStack, true);

router.trigger.apply(router, ['route:' + name].concat(args));
router.trigger('route', name, args);
Backbone.history.trigger('route', router, name, args);
Expand Down
7 changes: 5 additions & 2 deletions bower.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
{
"name": "backbone-async-route-filter",
"version": "0.1.0",
"version": "0.2.0",
"repository": {
"type": "git",
"url": "git://github.com/chirag04/backbone-async-route-filter.git"
},
"dependencies": {
"backbone": "~1.1.2"
}
}
}

0 comments on commit fe77504

Please sign in to comment.