fix: Server error when rendering share for deleted document

closes #2352
This commit is contained in:
Tom Moor
2021-07-23 11:25:11 -04:00
parent 84ad7c482c
commit 48d538b424
2 changed files with 14 additions and 1 deletions

View File

@ -82,7 +82,7 @@ const renderShare = async (ctx, next) => {
// Allow shares to be embedded in iframes on other websites
ctx.remove("X-Frame-Options");
return renderApp(ctx, next, share ? share.document.title : undefined);
return renderApp(ctx, next, share?.document?.title);
};
// serve static assets