Skip to content
Permalink
Browse files Browse the repository at this point in the history
session object should exist in task reqs for better compatibility
  • Loading branch information
boutell committed Sep 8, 2021
1 parent 5d0cd10 commit c211b21
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions modules/@apostrophecms/i18n/index.js
Expand Up @@ -467,9 +467,9 @@ module.exports = {
debug: self.debug,
show: self.show,
action: self.action,
crossDomainClipboard: req.session.aposCrossDomainClipboard
crossDomainClipboard: req.session && req.session.aposCrossDomainClipboard
};
if (req.session.aposCrossDomainClipboard) {
if (req.session && req.session.aposCrossDomainClipboard) {
req.session.aposCrossDomainClipboard = null;
}
return result;
Expand Down
3 changes: 2 additions & 1 deletion modules/@apostrophecms/task/index.js
Expand Up @@ -214,7 +214,8 @@ module.exports = {
Use req.t instead.
`);
return key;
}
},
session: {}
};
addCloneMethod(req);
req.res.__ = req.__;
Expand Down

0 comments on commit c211b21

Please sign in to comment.