about summary refs log tree commit diff
diff options
context:
space:
mode:
authorFire Demon <firedemon@creature.cafe>2020-08-20 08:26:36 -0500
committerFire Demon <firedemon@creature.cafe>2020-08-30 05:45:19 -0500
commit0c59a8adf5ff96d7d625af36f5cbe88296707d03 (patch)
tree9ce5b0721941d1c65ec393e1519eee70d6c462f4
parent6317cb60e03762596ecae034518b4da4c60a8f64 (diff)
[Bug] Treat null value as empty string
-rw-r--r--app/javascript/flavours/glitch/actions/timelines.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/javascript/flavours/glitch/actions/timelines.js b/app/javascript/flavours/glitch/actions/timelines.js
index f6cb2d989..be0868a0c 100644
--- a/app/javascript/flavours/glitch/actions/timelines.js
+++ b/app/javascript/flavours/glitch/actions/timelines.js
@@ -134,6 +134,7 @@ export const expandPublicTimeline          = ({ maxId, onlyMedia, onlyRemote, al
 export const expandCommunityTimeline       = ({ maxId, onlyMedia } = {}, done = noOp) => expandTimeline(`community${onlyMedia ? ':media' : ''}`, '/api/v1/timelines/public', { local: true, max_id: maxId, only_media: !!onlyMedia }, done);
 export const expandDirectTimeline          = ({ maxId } = {}, done = noOp) => expandTimeline('direct', '/api/v1/timelines/direct', { max_id: maxId }, done);
 export const expandAccountTimeline         = (accountId, { maxId, filter } = {}) => {
+  const path = filter ? filter : '';
   const params = {
     include_replies: filter === ':replies',
     include_reblogs: filter === ':reblogs',
@@ -143,7 +144,7 @@ export const expandAccountTimeline         = (accountId, { maxId, filter } = {})
     max_id: maxId,
   };
 
-  return expandTimeline(`account:${accountId}${filter}`, `/api/v1/accounts/${accountId}/statuses`, params);
+  return expandTimeline(`account:${accountId}${path}`, `/api/v1/accounts/${accountId}/statuses`, params);
 };
 export const expandAccountFeaturedTimeline = accountId => expandTimeline(`account:${accountId}:pinned`, `/api/v1/accounts/${accountId}/statuses`, { pinned: true });
 export const expandAccountMediaTimeline    = (accountId, { maxId } = {}) => expandTimeline(`account:${accountId}:media`, `/api/v1/accounts/${accountId}/statuses`, { max_id: maxId, only_media: true, limit: 40 });