From 2fe385bdb26b5a1947c1527ad71bd71b0e982d5c Mon Sep 17 00:00:00 2001 From: oleg Date: Sun, 27 Sep 2015 10:57:53 +0300 Subject: [PATCH] send project inside data on project change --- resources/projects.js | 2 +- static/js/app/stores/project.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/resources/projects.js b/resources/projects.js index 1d4f73d..dbc46a2 100644 --- a/resources/projects.js +++ b/resources/projects.js @@ -83,7 +83,7 @@ module.exports = function(app) { getProject({condition: condition}, this.slot()); }, function(err, project) { - resource.clientEmitSync('change', project); + resource.clientEmitSync('change', {project: project}); }, function(err) { console.error( diff --git a/static/js/app/stores/project.js b/static/js/app/stores/project.js index 23fed47..ffa1c9b 100644 --- a/static/js/app/stores/project.js +++ b/static/js/app/stores/project.js @@ -10,8 +10,8 @@ define([ listenables: ProjectActions, project: null, - onChange: function(project, action) { - this.trigger(project); + onChange: function(data, action) { + this.trigger(data.project); }, init: function() {