Bug 2374 - The projects cache isn't cleared properly when a user logs out in tree.taiga.io

stable
Alejandro Alonso 2015-03-13 11:14:30 +01:00 committed by David Barragán Merino
parent 810eefefc8
commit d33591ebc4
1 changed files with 3 additions and 3 deletions

View File

@ -50,7 +50,7 @@ class ProjectsController extends taiga.Controller
promise = @.loadInitialData()
promise.then () =>
@scope.$emit("projects:loaded")
@scope.$emit("projects:loaded", @.projects)
promise.then null, @.onInitialDataError.bind(@)
@ -257,8 +257,8 @@ ProjectsListDirective = ($compile, $template) ->
$el.html($compile(template({projects: projects}))($scope))
$scope.$emit("regenerate:project-pagination")
$scope.$watch "projects", (projects) ->
render(projects) if projects?
$scope.$on "projects:loaded", (ctx, projects) ->
render(projects.all) if projects.all?
return {
link: link