fix bug with empty string when logging in
[rss-reader.git] / src / server.ts
index 7add8509c2cbeb6b322eef587862f09fe159d502..e4c2db75e0ac20826f948cacde1433b3b7002162 100644 (file)
@@ -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<any> => {