Github user garrensmith commented on a diff in the pull request:

    https://github.com/apache/couchdb-fauxton/pull/206#discussion_r22030690
  
    --- Diff: app/addons/documents/routes-documents.js ---
    @@ -146,9 +145,14 @@ function(app, FauxtonAPI, Documents, Changes, Index, 
DocEditor, Databases, Resou
         onSelectDatabase: function (dbName) {
           this.cleanup();
           this.initViews(dbName);
    +
           FauxtonAPI.navigate('/database/' + app.utils.safeURLName(dbName) + 
'/_all_docs', {
             trigger: true
           });
    +
    +      // we need to start listening again because cleanup() removed the 
listener, but in this case
    +      // initialize() doesn't fire to re-set up the listener
    +      this.listenTo(FauxtonAPI.Events, 'lookaheadTray:update', 
this.onSelectDatabase);
    --- End diff --
    
    Could you DRY this up by putting this line in a method and call this method 
here and in the initialize.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to