From 45c5ea69a6c1d9336c69aa1a3ebb6a8484f1cc31 Mon Sep 17 00:00:00 2001 From: alemi Date: Thu, 21 Mar 2024 01:09:54 +0100 Subject: [PATCH] fix: .flat() returning empty arrays --- src/activitystream/node.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/activitystream/node.rs b/src/activitystream/node.rs index 880b8888..418fd87e 100644 --- a/src/activitystream/node.rs +++ b/src/activitystream/node.rs @@ -66,7 +66,8 @@ impl Node { arr .into_iter() .filter_map(|node| match node { - Node::Empty | Node::Link(_) => None, + Node::Empty => None, + Node::Link(l) => Some(serde_json::Value::String(l.href().to_string())), Node::Object(o) => Some(o.underlying_json_object()), Node::Array(_) => Some(serde_json::Value::Array(node.flat())), }).collect()