mirror of
https://github.com/svemagie/indiekit-endpoint-activitypub.git
synced 2026-04-02 15:44:58 +02:00
fix: normalize category to array in my-profile controller
When a post has a single category, Indiekit stores it as a string (e.g. "Fraude") rather than an array. Nunjucks iterates strings character by character, producing hashtag pills like #F #r #a #u #d #e.
This commit is contained in:
@@ -38,7 +38,11 @@ function postToCardItem(post, profile) {
|
||||
photo: profile?.icon || "",
|
||||
},
|
||||
photo,
|
||||
category: props.category || [],
|
||||
category: Array.isArray(props.category)
|
||||
? props.category
|
||||
: props.category
|
||||
? [props.category]
|
||||
: [],
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "@rmdes/indiekit-endpoint-activitypub",
|
||||
"version": "2.1.1",
|
||||
"version": "2.1.2",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@rmdes/indiekit-endpoint-activitypub",
|
||||
"version": "2.1.1",
|
||||
"version": "2.1.2",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@fedify/debugger": "^2.0.0",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@rmdes/indiekit-endpoint-activitypub",
|
||||
"version": "2.1.1",
|
||||
"version": "2.1.2",
|
||||
"description": "ActivityPub federation endpoint for Indiekit via Fedify. Adds full fediverse support: actor, inbox, outbox, followers, following, syndication, and Mastodon migration.",
|
||||
"keywords": [
|
||||
"indiekit",
|
||||
|
||||
Reference in New Issue
Block a user