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

Commit

Permalink
Fix a client/server render mismatch, where urlIfDeleted and title wer…
Browse files Browse the repository at this point in the history
…en't being put into the server-side shot
  • Loading branch information
ianb committed Nov 11, 2016
1 parent fafef59 commit 109bc3c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion server/src/pages/shot/model.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,14 @@ exports.createModel = function (req) {
hashAnalytics: true
};
if (serverPayload.expireTime !== null && Date.now() > serverPayload.expireTime) {
serverPayload.shot = clientPayload.shot = {
clientPayload.shot = {
url: req.shot.url,
docTitle: req.shot.title
};
serverPayload.shot = Object.assign({
urlIfDeleted: req.shot.urlIfDeleted,
title: req.shot.title
}, clientPayload.shot);
}
return Promise.resolve({serverModel: serverPayload, jsonModel: clientPayload});
};

0 comments on commit 109bc3c

Please sign in to comment.