summaryrefslogtreecommitdiffstats
path: root/examples/modular-backbone/js/router.js
diff options
context:
space:
mode:
Diffstat (limited to 'examples/modular-backbone/js/router.js')
-rw-r--r--examples/modular-backbone/js/router.js10
1 files changed, 1 insertions, 9 deletions
diff --git a/examples/modular-backbone/js/router.js b/examples/modular-backbone/js/router.js
index 3c3973f..5621f2f 100644
--- a/examples/modular-backbone/js/router.js
+++ b/examples/modular-backbone/js/router.js
@@ -9,8 +9,6 @@ define([
'views/footer/FooterView'
], function($, _, Backbone, HomeView, ProjectsView, ContributorsView, FooterView) {
- var contributorsView;
-
var AppRouter = Backbone.Router.extend({
routes: {
// Define some URL routes
@@ -36,15 +34,9 @@ define([
app_router.on('route:showContributors', function () {
- // there is a problem here -- when it draws the first everything is fine
- // but when it returns to this view, it adds the items to the list again
- // even though the collection has the same number of models
- // why won't it empty the divs?! I can do it in the console...
- if ( String(contributorsView) !== "undefined" ) contributorsView.clearListView();
-
// Like above, call render but know that this view has nested sub views which
// handle loading and displaying data from the GitHub API
- contributorsView = new ContributorsView();
+ var contributorsView = new ContributorsView();
});
app_router.on('route:defaultAction', function (actions) {