diff --git a/app/views/repositories/reload_processing.js.erb b/app/views/repositories/reload_processing.js.erb index fc29734..917b595 100644 --- a/app/views/repositories/reload_processing.js.erb +++ b/app/views/repositories/reload_processing.js.erb @@ -2,10 +2,13 @@ current_path_splited = window.location.pathname.split("/"); if(current_path_splited[1] != "repositories"){ current_path_splited.splice(1,1); // Removes the locale } +if(current_path_splited[1] != "projects"){ + current_path_splited.splice(1,1); // Removes the subdirectory +} current_path = current_path_splited.join("/"); // This if prevents it from updating the repository's state after the user leaves its page -if(current_path == '<%= repository_path(id: @repository, locale: nil) %>'){ +if(current_path == '<%= repository_path(id: @repository.id, locale: nil, subdirectory: nil) %>'){ $('div#processing_information').html('<%= escape_javascript(render partial: "processing_information") %>'); repository = new Repository.State(<%= @repository.id %>) repository.schedule_poll_state('<%= @processing.state %>') -- libgit2 0.21.2