From d7883019727a59b4b0dcf40014b5f68352e32710 Mon Sep 17 00:00:00 2001 From: Taka Date: Wed, 18 Mar 2020 09:53:49 +0000 Subject: [PATCH] Handle a permalink to an unknwon author correctly. --- web/src/index.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/web/src/index.js b/web/src/index.js index a4df913..6187d0a 100644 --- a/web/src/index.js +++ b/web/src/index.js @@ -37,7 +37,10 @@ ReactDOM.render( /> } /> gAppRef.runSpecialSearch( "/search/author/"+gAppRef.props.match.params.authorId, null, - () => gAppRef.setWindowTitle( gAppRef.caches.authors[ gAppRef.props.match.params.authorId ].author_name ) + () => { + const author = gAppRef.caches.authors[ gAppRef.props.match.params.authorId ] ; + gAppRef.setWindowTitle( author ? author.author_name : "Unknown author" ) + } ) } /> } />