summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorsupahgreg <supahgreg@users.noreply.github.com>2025-10-12 22:20:13 +0000
committersupahgreg <supahgreg@users.noreply.github.com>2025-10-12 22:20:13 +0000
commit7211d3468456bc770f227432e98be13bf7d7d42a (patch)
treed3a95f663d1981124c12fe95a3d97c0cc3e4cdc7 /js
parent360c552da41b08d92c8d5e0d01968ffe1e8e6323 (diff)
Add a workaround+note for a FeedTree feed item's 'error' being '[]'.
The backend is sending 'error' as a string (or undefined for cats).
Diffstat (limited to 'js')
-rwxr-xr-xjs/FeedTree.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/js/FeedTree.js b/js/FeedTree.js
index 09288845c..86a396068 100755
--- a/js/FeedTree.js
+++ b/js/FeedTree.js
@@ -224,7 +224,9 @@ define(["dojo/_base/declare", "dojo/dom-construct", "dojo/_base/array", "dojo/co
else
rc += " Is_Feed";
- if (!is_cat && item.error !== '') rc += " Error";
+ // TODO: item.error is `[""]` for feeds. Need to look into what's happening on the frontend to cause that-- the backend sends a string.
+ // For now, just adding a check for `[""]`.
+ if (!is_cat && item.error !== '' && !(Array.isArray(item.error) && item.error.length === 1 && item.error[0] === '')) rc += ' Error';
if (item.unread > 0) rc += " Unread";
if (item.auxcounter > 0) rc += " Has_Aux";
if (item.markedcounter > 0) rc += " Has_Marked";