summaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
Diffstat (limited to 'client')
-rw-r--r--client/components/cards/cardDetails.js3
-rw-r--r--client/config/router.js4
2 files changed, 5 insertions, 2 deletions
diff --git a/client/components/cards/cardDetails.js b/client/components/cards/cardDetails.js
index 69e0cfdd..09c99f4e 100644
--- a/client/components/cards/cardDetails.js
+++ b/client/components/cards/cardDetails.js
@@ -102,6 +102,9 @@ BlazeComponent.extendComponent({
_getUnsavedEditKey() {
return {
fieldName: 'cardDescription',
+ // XXX Recovering the currentCard identifier form a session variable is
+ // fragile because this variable may change for instance if the route
+ // change. We should use some component props instead.
docId: Session.get('currentCard'),
};
}
diff --git a/client/config/router.js b/client/config/router.js
index 76d7b3ad..1cac43a0 100644
--- a/client/config/router.js
+++ b/client/config/router.js
@@ -40,11 +40,11 @@ FlowRouter.route('/b/:id/:slug', {
FlowRouter.route('/b/:boardId/:slug/:cardId', {
name: 'card',
action(params) {
+ EscapeActions.executeUpTo('inlinedForm');
+
Session.set('currentBoard', params.boardId);
Session.set('currentCard', params.cardId);
- EscapeActions.executeUpTo('inlinedForm');
-
BlazeLayout.render('defaultLayout', { content: 'board' });
},
});