Skip to content
This repository has been archived by the owner on Jan 17, 2023. It is now read-only.

Commit

Permalink
Fix #1072, put Raven activation into reactrender pages
Browse files Browse the repository at this point in the history
  • Loading branch information
ianb committed Oct 13, 2016
1 parent 45de849 commit 895ca67
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions server/src/reactrender.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,13 @@ exports.render = function (req, res, page) {
let serverModel = model.serverModel || model;
jsonModel = Object.assign({
authenticated: !!req.deviceId,
sentryPublicDSN: req.config.sentryPublicDSN,
backend: req.backend,
gitRevision: getGitRevision()
}, jsonModel);
serverModel = Object.assign({
authenticated: !!req.deviceId,
sentryPublicDSN: req.config.sentryPublicDSN,
staticLink: req.staticLink,
staticLinkWithHost: req.staticLinkWithHost
}, serverModel);
Expand Down
2 changes: 2 additions & 0 deletions server/src/reactruntime.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ exports.HeadTemplate = class HeadTemplate extends React.Component {
<link rel="shortcut icon" href={this.props.staticLink("img/pageshot-icon-32.png")} />
{ this.props.noAnalytics ? null : <script src="//www.google-analytics.com/analytics.js" async /> }
{ this.props.noAnalytics ? null : <script src="/ga-activation.js" /> }
{ this.props.sentryPublicDSN ? <script src={ this.props.staticLink("vendor/raven.js") } /> : null }
{ this.props.sentryPublicDSN ? <script src="/configure-raven.js" /> : null }
{this.props.children}
</head>
);
Expand Down

0 comments on commit 895ca67

Please sign in to comment.