fix: don't send empty mp-syndicate-to in Micropub reply

Sending mp-syndicate-to: [] caused a server-side crash in jf2.js
where syndicateTo?.includes() received a non-iterable after
normalization. Only include the property when a target exists.

Confab-Link: http://localhost:8080/sessions/184584f4-67e1-485a-aba8-02ac34a600fe
This commit is contained in:
Ricardo
2026-03-14 23:40:43 +01:00
parent 395750da9b
commit 3eacba1672

View File

@@ -642,8 +642,6 @@
if (syndicateTo) {
body.properties['mp-syndicate-to'] = [syndicateTo];
} else {
body.properties['mp-syndicate-to'] = [];
}
fetch('/micropub', {