From: xangelo Date: Mon, 19 Dec 2022 16:03:43 +0000 (-0500) Subject: fix bug with empty string when logging in X-Git-Url: https://git.xangelo.ca/?p=rss-reader.git;a=commitdiff_plain;h=f1f3c20f05e6716ba4e6d907d66cb55772d3045e fix bug with empty string when logging in --- diff --git a/src/server.ts b/src/server.ts index 7add850..e4c2db7 100644 --- a/src/server.ts +++ b/src/server.ts @@ -159,7 +159,12 @@ apiGet('/app', {auth: false}, async (req, res) => { return; }, data => { - return data.html.replace(/{ACCOUNT_ID}/g, data.account_id); + if(data) { + return data.html.replace(/{ACCOUNT_ID}/g, data.account_id); + } + else { + return data; + } }); apiPost('/accounts/:account_id/feeds', {auth: true}, async (req, res): Promise => {